lmer (& siblings glmer & nlmer) are functions in the R package lme4 that fit mixed effects models (ie, models that include fixed & random effects). These models can be non-linear in the sense that the dependent variable is transformed by a non-linear function (eg, logistic or log) to accommodate non-...

learn more… | top users | synonyms

2
votes
1answer
26 views

Nested random factor with confounding (random?) variable

I have a question on how to specify a GLMM. I made an experiment with two treatments (control and treated) to test the effect of a water contaminant on reproductive cells of tadpoles. I have data on ...
2
votes
1answer
30 views

How to include nested fixed effects with different levels across conditions in lmer?

My design is as follows: 1. one dependent variable (brain activity), 2. a "condition" factor I manipulated with two levels (c1 and c2) 3. a "region of interest" factor with two levels (r1 and r2) *...
2
votes
1answer
45 views

Unbalanced linear mixed effect modeling for longitudinal data with lme4

I'm new to longitudinal analyses, and I'm having trouble formulating a model that accurately reflects my study design. This study recruited subjects for two groups (dx vs. control), with measurements ...
2
votes
1answer
21 views

Fitting and interpreting random effects in repeated measures and unbalanced ecological data set

I have a vegetation data set that consists of 150 plots that were sampled 1-3 times over a three year period. Plots are my unit of observation and they are unbalanced (since plots were sampled either ...
0
votes
0answers
20 views

Inconsistent pattern between mixed regression and data plot

I built a mixed linear regression model which includes a dependent variable 'dv', independent variable 'v1' & 'v2', and subject ID 'subject'. The R syntax is shown below: output <-lmer(dv ~ ...
0
votes
0answers
33 views

How should one select amongst competing mixed models in a model selection paradigm?

I suspect two biological functions trade off (i.e. as one goes up, the other goes down). Trade-offs are often non-linear, but there has not been a ton of work to suggest which family of curves tends ...
2
votes
0answers
15 views

Algorithm for mixed-effects models with 100 random effects

I am wondering if there is any algorithm can estimate a mixed-effects model with 100 random effects, i.e., the covariance matrix $\boldsymbol D$ for random effects is 100$\times$100. I tried the ...
0
votes
0answers
34 views

Difference between car and lmerTest results for lmer model [lme4]

I fit a mixed effects model using lme4 and compared the anova tables generated by the packages "lmerTest" and "car". Both should be able to handle lme4 objects. When running the below code, the ...
1
vote
1answer
22 views

model specification: crossed random effect for item and subject with fixed effect nested (??) within items

In a previous thread I got the advice to run a crossed random effects linear mixed model with my data. Whilst working on the model specification, I came across a new question. In short, all ...
1
vote
0answers
8 views

Is Random intercept by items “parasitic” on fixed effects tied to items?

I have the following model (simplifying to get to the point): Y1 ~ X1 + (1|subject) + (1|item) X1 is "confounded" with item, meaning each item takes on one and only one value of X1. I have been ...
1
vote
0answers
22 views

When nature passes through (0;0): what are the consequences for a linear mixed model?

I'm analyzing the data for my master thesis; it's about photosynthetic efficiency for 10 different genotypes of a certain plant species (genotype=Accession in my dataset). For each Accession, I've ...
1
vote
0answers
41 views

Linear Mixed Effects Models - combining coefficients

Suppose I have a sample of height data for a population with sex and region identifiers. Now, suppose I estimated the linear mixed model against a variable $x$. I'm using the ...
3
votes
0answers
41 views

Correlated random slopes and intercepts but non-significant random slopes. Can you have one without the other?

I am running a multilevel model. When I compare the random slope without a correlation (Model 2) model to the just random intercept model (Model 1) it is not significant (via likelihood-ratio test). ...
1
vote
1answer
45 views

Test significance of categorical variable with multiple levels, when model also includes interactions

I am fitting a mixed model with the command model=lmer(Activity ~ 1 + Novelty*Valence*ROI + (1 | Subject)) Activity is a measure of brain activity, Novelty and ...
0
votes
0answers
13 views

What error distribution can I use for GLMM with continuous data but not normal due to too many 0s?

I am having problems with building a generalised linear model with random effects. I am modelling how a sensitivity ratio between various taxa and cyanobacteria (logSR) is effected by the taxa and ...
3
votes
0answers
51 views

How to calculate prediction confidence intervals for estimated mixed model change scores varying per a continuous predictor, using “lme4” in R

The Setup I am employing a linear mixed model in R using the packages "lme4" and "lmerTest." In modeling my predicted variable, I have two time indicators set as fixed and random effects: one time ...
7
votes
0answers
127 views

Writing out the mathematical equation for a multilevel mixed effects model

The CV Question I'm trying to give (a) detailed and concise mathematical representation(s) of a mixed effects model. I am using the lme4 package in R. What is the ...
3
votes
0answers
34 views

How to interpret lsmeans output for my lmer model?

I've defined an lmer model in R with 2 fixed effects, 2 random intercepts and a random slope: ...
0
votes
0answers
25 views

Mixed Models: Random effects for baseline measure

I’m currently working on a data-set where we used a diary-design. As I’ve got multiple measure points for each individual, I decided to use mixed models to analyze the dataset. Our participants filled ...
0
votes
1answer
25 views

How are “MuMIn::mod.sel()” and “car::Anova()”/"lmerTest::anova() different for selecting the most optimal model? Is it only the AIC and AICc?

I want to compare several models built using the codes I have written in R for a mixed-effects model. I already knew that anova() function in car package provides <...
1
vote
3answers
123 views

Mixed-effect model in R using lme for data count data with two fixed effects and repeated measures

I have no idea how to analyze this dataset. I am asking if two genotypes, T and M, respond differently to a treatment, E2 (I also have a control, CON). All 36 animals were given both E2 and CON in a ...
2
votes
0answers
51 views

Can a random effects intercept variable be highly but coincidentally correlated to a response variable?

Issue- I'm creating a logistic mixed model where the response variable (if a plot falls within an active bird lek area) is highly related to a term I may include as a random effects term (grazing ...
0
votes
0answers
19 views

Predicting viewer's cultural heritage from glmer and lmer versions of formula with different results?

I'm trying to understand why I'm getting different results when comparing anovas for glmer(binomial) and lmer versions of a formula. I am interested in whether a participant/viewer's cultural ...
0
votes
1answer
22 views

zero estimate for value and std. error for mixed models in R

I ran an linear mixed effects model in r. The summary statistics for my fixed effects has estimates of zero but gives me a t-value and p-value (see variable Buffer_400 in image below). How do I ...
0
votes
1answer
35 views

lme for multiple groups comparing treatment vs control

I would like to check for differences in growth rate between groups. I have three main groups miRs and for each group I have a ...
0
votes
1answer
30 views

lmer model doesn't return t-value [closed]

I'm currently running a time series analysis which requires me to fit lmer models to each of my data points. Here is my code : ...
0
votes
0answers
14 views

Convergence issues: maximal model converges, model with fewer predictos won't

I've run the below model in lme4 (lmer) without any issue: ...
0
votes
0answers
25 views

Why do I get chi values, when I've stated F test?

I am trying to do an lmer and find my MAM model, using the lme4 package, and have two problems/questions in that connection. Q1: My starting model is this: ...
0
votes
0answers
25 views

Two way repeated measures with zeros, non integer values, and non-normal distribution

I would really appreciate some help with a few models I am trying to run. Essentially my data looks at how often a subject was visited depending on treatment and subject type across two years. The ...
0
votes
0answers
11 views

How to set lower/upper bound for LMER analysis

I'm not sure if this is possible but can I set a lower bound for my LMER analysis? i.e. so that the estimated means will not be lower than zero? Thanks
0
votes
1answer
106 views

Mixed-effect model / ANCOVA with lmer in R

I have a question according the following example: What I want to find out is whether two fertilizers (A and B) have different effects on the biomass of my plants. My explanatory variable is '...
0
votes
0answers
27 views

Controlling for variables with lmer (R)

I am using lmer (from the lme4 R package) on a dataset with 6 variables: SubjectID, ImageID, Category, Brightness, Contrast and ResponseTime, where the last three are continuous variables. (and yes, ...
3
votes
0answers
33 views

four period crossover design in lmer or lme4

Our experimental setting is a four-period crossover design: the table below indicates typical types of experimental data. ...
0
votes
1answer
99 views

sjPlot: probabilities. How to interpret?

I am running the following model in R: model = lmer(Tau ~ ageS*days+YrsOfEds*days+sex*days+tract*days + (1|SubjectID), data=long) With this model I am ...
0
votes
0answers
29 views

robust mixed models 3 time points (y-side) and high dropout

I am running the model in R: model = rlmer(Tau ~ tract_FA_avg + (1|Subject), data=long2) (robust as I have outliers) Since I am relatively new to mixed ...
0
votes
0answers
24 views

How can I test the interaction of a 3-level, within-subjects variable with a continuous variable in R?

I would be extremely grateful for some advice on how to correctly fit linear mixed effects models with my repeated measures design! In my experiment, subjects completed a task with 3 difficulty ...
0
votes
0answers
30 views

Analyzing pre/post (longitudinal) data using limma/lme4 with adjustment for continuous covariates

I’m analyzing Illumina 450K data of a study of following design Subject Group Time-point Class 1 Control Baseline 1 1 Control Follow-up 2 2 Control Baseline 1 2 Control Follow-up ...
1
vote
0answers
13 views

Cross-classified multi-level model - application to marketing

I am working on predicting whether an individual customer will respond favourably to a marketing campaign (yes/no). I have data about customers, and their responses to previous campaigns. If possible, ...
0
votes
0answers
8 views

using lmer to attain the t statistics for the difference in alpha in two regressions

So I have 10 bond return time-series dataset (portfolio1 to portfolio10). Portfolio1 is the ...
0
votes
0answers
28 views

predict() including random effects in lmer lme4

I have the following linear mixed effects model: m01 <- lmer(man ~ year + (1|refID/stuID) + (1|country), data = hunt, weights = harv) I am trying to plot a ...
24
votes
1answer
260 views

When are zero-correlation mixed models theoretically sound?

The block quotation below, from leaders in the field of mixed effect modeling, claims that coordinate shifts in models with zero correlation between random effects ('ZCP' models) changes model ...
0
votes
0answers
28 views

'cor' and 'lmer' give inconsistent correlation output

I have a data matrix with 4 independent variables and 1 binary dependent variable, I tried to look at the correlation among 4 independent variables using 'cor' function, the output is shown below: <...
0
votes
0answers
26 views

lmer in R: difference between general intercept and specific intercept [duplicate]

When trying to use lme4 package, I noticed that in the sample code there are "1+" or "0+". This related to intercept. But I am ...
0
votes
0answers
24 views

Need help interpreting lmer output (ie should glm and lmer p values differ significantly?) [duplicate]

I posted this in Stack Exchange, but figure it may be better suited here given that it isn't a programming question per se: I initially ran a mixed model to calculate p values from a mixed model: <...
0
votes
0answers
36 views

Model comparison with segmented linear mixed effetcts model (lmer)

I have been looking into segmented modelling, but I need to use a mixed effects framework, as I need to include some random effects. I originally had the following model, which came out as the best ...
1
vote
0answers
118 views

Using gamm4 for generalized additive models with random effects. Use the fitted values from the `mer` part or the `gam` part?

As the title indicates, I am using the R package gamm4 for generalized additive modeling with random effects. The response for individual $i$ in group $j$, $y_{ij}$, is modeled in terms of the ...
1
vote
0answers
32 views

Translating lmer syntax with fixed effects, covariate and random intercepts in a “conventional” or standardised way

I have the following lmer() syntax: lmer(Y ~ A*B*C + COV + A:COV + B:COV + C:COV + (1|A:BLOCK)) where ...
0
votes
1answer
114 views

predicted vs expected values using lmer in R

I am running a multilevel model with several interactions and a binary treatment. To summarize the model I would like to compute the first differences between treatment (1) and control group (0) using ...
0
votes
0answers
29 views

lmer = Fitting mixed model from complex to simple (backward)

I've been trying to run some analyses using mixed effect models in R, but the more I read about it, the more the questions I have. I'm sorry if some of those might seem obvious and rather silly, but I'...
3
votes
1answer
155 views

Is it reasonable to include a random slope term in an lmer model without the corresponding fixed effect?

I have an experiment in which I presented multiple stimuli to participants and wanted to control for the order in which the stimuli for shown. I am curious if it's possible to only account for order ...