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
14 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
18 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
7 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
10 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
12 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
241 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
24 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
25 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
18 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
33 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
24 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
74 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
101 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
23 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
36 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
41 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
46 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
25 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
28 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
34 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
46 views
0
votes
0answers
35 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
46 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
22 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
85 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
27 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
31 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
87 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
57 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 ...
0
votes
0answers
42 views

adding interaction term gives opposite relation

I am trying a mixed model in R (lme4). The objective is to evaluate the average glucose level of patients in a hospital is decreasing in the last four years. The model is simple that glucose values ...
1
vote
0answers
61 views

How do the observed values of random effects enter the computation of linear mixed models?

How do the actual values of the random variable $b$, collected from observation, enter into the maximum likelihood computations for the linear mixed effects model? Specifically, for the model ...
0
votes
1answer
124 views

Nesting random effect within fixed effect using lmer() of lme4 in R

Problem I want to fit a model using the R lme4 lmer function, and I'm not sure how to specify a random effect that is nested within a fixed effect. Setup I am applying a ...
0
votes
0answers
35 views

Linear Mixed Model with 3 variables

I would appreciate some assistance with setting the statistical analyses of my experiment. During my experiment 14 participant's motor responses (ptp) were tested ...
1
vote
1answer
85 views

fitting a binomial glmer or an lmer to a proportional response variable

I'm hoping somebody can help with what I think is a relatively simple question, and I think I know the answer but without confirmation it has become something I just can't be certain of. I have some ...
0
votes
0answers
27 views

Within-subject repeated linear mixed-effects design in lmer

I would like to know more about the correct way to specify a within-subject repeated measures LME. In the study, participants (id) saw videos of 4 different conditions (each participant saw all 4 ...
0
votes
0answers
12 views

factors associated with change

Can someone help me to find the factors associate with change. I have repeated measures data of blood glucose of 700 patients for continuous four years. I have few other information about these ...
0
votes
1answer
150 views

Interaction term in a linear mixed effect model in R

I am attempting to analyze the effect of two categorical variables (landuse and species) on a continuous variable (...
0
votes
1answer
55 views

How to simulate data to demonstrate mixed effects with R (lme4)?

As a counterpart to this post, I worked on simulating data with continuous variables, lending themselves to correlated intercepts and slopes. Although there are great posts on this topic on the site, ...
0
votes
0answers
59 views

Mediation for mixed model with crossed factors in R

I am looking for a possibility to test for mediation in a scenario where the individual paths (M ~ X, Y ~ M + X) are represented by mixed models with crossed factors (with binary x and continuous m): ...
3
votes
1answer
79 views

Random effect specification in lmer mixed effect model

What is the difference between (1|DNA.concentration/mouse.id) and (DNA.concentration|mouse.id)? What do the symbols ...
0
votes
0answers
42 views

lmer like Anova: visualizing with lsmeans (log transformed)?

I have fitted a linear mixed effects model to my data. I first determined that it was appropriate to log transform my response variable. Here is the equation: ...
0
votes
0answers
49 views

Relationship between linear mixed model assumption checks and repeated-measures ANOVA assumptions

Based on a previous question that I asked about checking assumptions of repeated-measures ANOVAs in R (which turns out to be not so trivial), I'm wondering about the relationship between a ...
0
votes
0answers
40 views

R: Confusion about research question using GLM

I have a dataset with 3 colonies (A, B and C, see below). Each colony is divided into 2 treatments: control and DWV. I use a GLM to test wether there is a difference of the life expectancy ...
0
votes
1answer
30 views

Post hoc test (lsm) gives unverifiable t and p values for my lmer model

I have a model of the following structure: lme4::lmer(formula = signal ~ factorA + factorB + factor C + (1 | subj), data = s) and find a significant main ...