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

1
vote
0answers
3 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
36 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
37 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
42 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
10 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
49 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
120 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
20 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
23 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
23 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
102 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 ...
1
vote
0answers
22 views

Linear mixed model with skewed residuals

I have a dataset of 720 observations, 15 each on 12 sites and in 4 points in time. My aim is to find out if there are differences in the measured variable between the sites and times of measurement. ...
2
votes
0answers
48 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
19 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
34 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
9 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
24 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
10 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
86 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
25 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
28 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
75 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
26 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
20 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
7 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
22 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
256 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
29 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
87 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
31 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
109 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
145 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 ...
1
vote
1answer
38 views

Binary variable shows twice in random effects when random intercept excluded [R, lme4]

When I use lmer of lme4 to fit a random one-variable slope model with random intercept excluded, both levels of the one-variable ...
3
votes
1answer
49 views

Nesting terminology in lmer

Suppose I have the following nested lmer structure: lmer(Y ~ X1 + X2 + X1:X2 + (1 | A) + (1 | A:B), data=d) which is the same ...
0
votes
0answers
44 views

Contrasts for hypothesis test in linear mixed model with repeated measures in R

I have data from an experiment in which we measured electromyographic (EMG) activity of 4 muscles before and after an emotion induction, in 71 participants. I have my data in long format, so I have ...
0
votes
0answers
70 views

Mediation in Multilevel Models using R

I am trying to estimate a mediation models using repeated (over time) observations for the same subjects (firms). I am using lme4 (lmer function) to estimate my models and then attempting to use the ...
1
vote
1answer
32 views

Comparing variance components

Say I have TWO data sets collected at different times with the same design. I fit a mixed model using in R using lmer lmer(y ~ (1|A)) to these data sets and get two estimates of $\sigma^2_A$ and $\...
0
votes
0answers
75 views

How to fit 3-level factor in lmer of lme4 with zero correlations between random slopes?

I'm trying to fit a linguistics model with a 3-level fixed factor (Condition) in lmer(). There are 20 Subjects and 12 Items, in ...
0
votes
0answers
28 views

Mixed model with clustered and repeated-measures data

I'm analysing the results of an experiment using a mixed model. Reaction times for each subject (40 male and 40 female) to 8 stimuli have been registered. The process has been repeated on the same ...
1
vote
1answer
43 views

How is correlation between fixed intercept and fixed effect calculated in lmer of R, lme4?

When I fit any model in lmer(), summary identifies a correlation between fixed effect(s) and the (fixed) intercept. How should ...