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 ...

learn more… | top users | synonyms

0
votes
0answers
5 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. ...
1
vote
0answers
35 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
17 views

Predicted values in random intercepts model with more than one explanatory variable [on hold]

I want to obtain predicted values from random intercepts model by setting some predictors constant. I have a data set of 58 countries. I ran a RI model after controlling for demographics (...
0
votes
0answers
15 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
17 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
27 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
26 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
4 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
23 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
20 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
9 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
54 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
21 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
21 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
54 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
25 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
22 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
17 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
11 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
14 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
247 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
26 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
23 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
21 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
43 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
26 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
89 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
27 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 ...
3
votes
1answer
117 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
31 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
47 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
40 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
53 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
28 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
61 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
27 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
34 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 ...
0
votes
0answers
38 views

Model Selection - adding categorical covariates to mixed linear models

I have a dataset consisting of genotypes (crop lines) being grown in multi-replication trials across environments. Here is the mixed linear model I've been working with: $$ Y_{ijk} = \mu + G_i + E_j ...
0
votes
1answer
48 views
0
votes
0answers
43 views

Specify a nested model in lavaan?

I am interested in fitting two models using the 'lavaan' package in R. I have a psychotherapy data set that has a nested structure - patients nested within therapists. I'm interested in fitting a ...
1
vote
0answers
47 views

How to specify a simple model in lmer/lme4: do I need explicit nesting?

I am measuring response time RT_log for 3 experimental manipulations (Conditions), and there are 4 ...
0
votes
0answers
24 views

Multilevel model using negative binomial

I'm trying to look at between region variation (5 regions in total) in disease cases and the influence of climatic factors. How do interpret the variance given such a small value i.e variance when ...
1
vote
0answers
90 views

Mixed model with crossed effects and repeated measures - what is correct ‘maximal model’ for use in lmer/lme4? [R]

Objective I have a crossed and implicitly nested design and am trying to validate the correct ‘maximal’ model (including all linear and pairwise interactions of the variables) for use in ...
1
vote
0answers
28 views

Application of Huber-White Variance Estimates in GLMER

I'm currently working on an analysis in R using GLMER mixed-effects model with a logistic regression framework under the lme4 package. I would like to include empirical (Huber–White sandwich) variance ...
1
vote
1answer
36 views

Using re.form= in predict.merMod() for a lmer() model

If I fit a model with a random-intercept and random-slope then use predict.Mermod with re.form = ~ (1|Subject), my gut told me ...
1
vote
0answers
47 views

Fixed effect not siginificant in multi-level model, what else to report besides significance?

I'm studying the effects of a teaching style intervention on student motivation. I use multi-level modeling since students are nested within teachers. The condition main effect is not significant (p = ...
0
votes
0answers
110 views

Back-transform coefficient from linear mixed model with log-transformed response

I ran a linear mixed model (lme4::lmer in R) with a log-transformed (base 2) response, and predictors were not transformed. I want to back-transform my coefficients to make a statement about effect ...
0
votes
1answer
63 views

How to preserve order of factor levels in R [closed]

I have an unbalanced longitudinal data for glucose levels of some patients coming to a hospital. My data looks like id, date, glucose_level. As I want to find the ...