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

1
vote
0answers
9 views

Use lmer to test main effects and interaction

I have to solve a problem using a linear mixed model (lmer). Six subjects performed two tests, (test1, ...
0
votes
0answers
16 views

How to write up my data [on hold]

I'm a newbie in using lmer4, so I'm trying to practise... Let's suppose that these are my data (it's only an example): this is the model: fm = lmer(value ~ condition*scale + (1|sub) + (1|variable) ...
0
votes
0answers
6 views

Specifying interaction term within nested factors in lmer [on hold]

I'm trying to understand how to include a nested term within an interaction effect in a mixed model ANOVA. Data: Factor A (Fixed) Factor B (Random) Factor C (Random) Factor D (Random) Model: ...
0
votes
1answer
22 views

lmer syntax for a two-way model with one fixed and one random factor [on hold]

Please could anyone tell me if my R code is correct? I have a two-way model with one fixed factor, habitat, and one random factor, site. The code I am using is: ...
0
votes
0answers
10 views

Multilevel model with multiple level 2 variables

I am estimating a model where I want to know how the performance will vary across the students as influenced by their individual characteristics and aspects of their schools. Performance is the ...
3
votes
1answer
41 views

Hypothesis testing: If not a p-value in mixed effect models, then what?

I've been working on a messy, repeated measures data set of endocrine data looking at a small group of variables (after eliminating several uninteresting contenders in exploratory data analysis), each ...
0
votes
0answers
45 views

Model averaging predictions from lmer models

I am trying to model average predictions (not betas) and estimate confidence intervals from linear mixed models run with lme4::lmer. I have experimented with functions in the MuMIn and AICcmodavg ...
1
vote
0answers
26 views

What does (1|g1/g2) mean in a lmer formula?

What does this formula mean? lmer(y ~ (1|g1/g2)) equivalently: lmer(y ~ (1|g1) + (1|g1:g2) According to the PDF that I ...
1
vote
1answer
69 views

Correct glmer distribution family and link for a continuous zero-inflated data set

Data set details: Zeros are "real" (volume) Data set is heavily left skewed (even when zeros are excluded) Response is continuous (volume) Can anyone recommend a distribution family and link that I ...
1
vote
0answers
28 views

Comparing mixed-effects and fixed-effects models

Given three variables, y and x, which are positive continuous, and z, which is categorical, ...
0
votes
0answers
31 views

Error when using mixed function in afex package on GLMM

I have been using lme4 in order to fit an overdispersion model and GLMM to my data as shown below. This seems to work fine. ...
1
vote
0answers
12 views

How to include questionnaire data with behavioral counts in lmer() maximal logistic regression model?

I’m using a maximal logistic regression model to analyze some data. I would like to keep using this technique if possible, just include more data in the model. The main data I’m looking at is counts ...
4
votes
0answers
52 views

R lmerTest and Tests of Multiple Random Effects

I'm curious about how lmerTest package in R, specifically the "rand" function, handles tests of random effects. Consider the example from the lmerTest pdf on CRAN that uses the built in "carrots" ...
3
votes
1answer
66 views

lme4: random effects

I have a simulated data set of 4 repeated measurements (measure) for 5 subjects (subj), 20 trials (trl) each. I am trying to fit a model with random slopes for age category with subject and trials ...
0
votes
1answer
34 views

Material difference between Mixed Effects Model and normal Linear Model

I have a question about normal linear models vs mixed models. Say I'm predicting prices for certain products, and I know two things: store and brand: In a linear model (lm), this would be: ...
0
votes
1answer
40 views

Two factor linear mixed effect model with multiple slopes (lmer)

I have data with two factors TREATMENT and TIME both with two levels and a dependent variable RATIO. Besides random intercept for subjects, I want to specify random slopes for both of the independent ...
0
votes
0answers
24 views

plot lmer confidence intervals

I have a mixed model fitted with lmer4 [ModelSub = CA ~ P + T + S + (1|Study)] which yields the following estimates - ...
1
vote
1answer
23 views

Random variable in mixed-effect model (ecological studie)

I'm beginner with the mixed-effects model, so I already apologize if my question is a bit naive. My problem is the following : I sample each time 30 plants in 6 populations on 9 mountains. So I ...
1
vote
1answer
53 views

Addressing “NOTE: Results may be misleading due to involvement in interactions” warning with Tukey post-hoc comparisons in lsmeans R package

Background: I am using linear mixed-effects models (LMMs) in order to determine how the interaction between two fixed effects influences measures of a response variable. Since I am working with a ...
0
votes
0answers
29 views

scale() function and standardized values for fixed effects

I'm currently using the scale() function in a glmer model (see below) and I'm having some inconsistencies between my ...
1
vote
0answers
70 views

Testing and correctly interpreting the significance of nested random effects

I'm building a series of relatively simple random effects models where we repeatedly measure a water quality variable, say conductivity (cond), in different watersheds (ws) and streams (st). Here, ...
1
vote
0answers
33 views

What is a case where including random correlation parameters decreases the error on the fixed effects?

I'm wondering about the effect of true correlations among random effects on the standard error of my fixed effects in lme4::lmer models in R. My assumption is ...
2
votes
1answer
446 views

Obtaining adjusted (predicted) proportions with lme4 - using the glmer-function

I aim to estimate the annual proportion of patients (% of patients) that are smokers in a population whose age and sex must be taken into account. In other words, I want to calculate the adjusted ...
2
votes
1answer
44 views

Why are the beta values provided in lmer() different than simple group means of observations?

In a 2-level mixed-effect model, the equation for level-1 is $$Y_{ij} = \beta_{0j} + r_{ij}$$ where $\beta_{0j}$ is the mean outcome for the $j$-th group. I ran the following model: ...
1
vote
0answers
36 views

lme4 (v1.7) fails at fitting an “animal model” (LMM) compare to rrBLUP

I would like to fit a basic "animal model" (a kind of linear mixed model, see below) using the latest version of lme4 on CRAN (v1.7). To check the results, I am fitting it on simulated data, and ...
0
votes
1answer
80 views

Mixed effects model rank deficiency

I'm looking at the impact of dietary treatment and sex on weight. My dataset comprises weight data for 3 dietary treatments and sex (male and female). The experimental design was run in duplicate, do ...
1
vote
0answers
29 views

How to specify random effects in lmer

I have 3 groups of animals that are divided into 3 subgroups, each subgroup contains animals that are specific to each subgroup (there is no same animal in two groups). How do I specify random effects ...
0
votes
0answers
16 views

choosing the best structure of the random effects in a GLMM [duplicate]

I am trying to choose the best random effect structure in a GLMM, before starting with the fixed terms. To do that I include all the fixed effect and their interactions (beyond optimal model) and ...
2
votes
1answer
101 views

Mixed models and backward elimination

Let's say I have a data like this, and I'm trying to build a mixed model. ...
1
vote
0answers
32 views

lmer, effect of a ramdom factor in a covariate [closed]

hi I am doing a General Linear Mixed Model in R, lme4 package. I want to test the effect of a random effect on a covariate, as well as on the response variable. I thin that the command would be the ...
5
votes
1answer
77 views

Do I need more than one random slope?

When constructing a GLMM in R, do I need more than one random slope if I "see" that slopes differ for multiple continuous variables? In my case, I am analysing the number of plant species (...
9
votes
2answers
292 views

Random- and fixed-effects structure in linear-mixed models

Consider the following data from a two-way within subjects design: ...
2
votes
1answer
136 views

lmer and random effects

Here is somewhat simplified structure of the data I have, since fixed effects are quite straight forward, however, random effects are giving me a headache (like I said something new :) ): ...
1
vote
0answers
20 views

lmer nested design estimating variance of one level as zero

I have data from a series of psychology experiments in which human subjects completed one of many tasks. Multiple observations are taken per subject. Finally, tasks can be divided into one of two ...
2
votes
1answer
78 views

2 factor factorial model with random factors

Using lme4, how does one define a full 2-factor factorial model with both factors (and their interaction) being random? Specifically I am trying to recreate the ...
0
votes
1answer
64 views

Modeling error structure in lmer in R?

Is it possible to add a parameter to lmer model which will be modeling the error structure? Sth similar to TOEP(X) and SP(POW) from SAS???
2
votes
0answers
60 views

Mixed-effects: length of the experiment as a continuous fixed effect?

I have measurement of nitrogen uptake Nup across 4 different SITE very far from each other and in different years (e.g. ...
1
vote
0answers
20 views

Retrospective power analyis of lmer for sample size

I'm an MSc student doing an assignment where I am asked to analyze and write up a report on a dataset on environmental enrichment in zebra finches. Among other things we are being asked to do a ...
0
votes
0answers
69 views

In R package lme4, how do you force the random slopes and intercepts to be uncorrelated for an interaction term?

I have a mixed model, fit using lmer in R, that has three interaction terms (X1:X1, X1:X3, ...
1
vote
0answers
37 views

R lmer Model Diagnosis qqnorm

I fitted this lmer model: m1 <- lmer(logR ~ N_g.m.2 * Year + (1|Wh/N_g.m.2), data = CO2_Ratio) Rendering the attached qqplot. ...
2
votes
1answer
59 views

How do I contrast code for a factor where one level is the application of both of two others?

I have a factor 'Music' that has four levels: none, piano, guitar, and mixed. Subjects gave a response hearing no music, piano only, guitar only, or piano and guitar, so I want to create an lmer model ...
2
votes
0answers
26 views

Linear mixed model construction validation

I have 6 groups of fish made up of 8 individuals. Each group is tested three times under different treatments. These group level treatments are hungry , ...
0
votes
1answer
76 views

graphical representation of fixed effects from lmer

I have run a lmer model in R: ...
4
votes
1answer
194 views

How to formulate linear mixed model to find out effects of continuous variables?

I have a dataset with growth rate as a response variable (resp in the example) and temperature, food availability, and salinity as predictor variables (...
0
votes
0answers
65 views

Using lmer for random effect and nested interpreting model comparison

I'm trying to do a lmer in r. I did an experiment in which I manipulated the temperature. My dataframe contains the following factors: Site: 11 level, random Species: 2 levels, fixed Subject: 10, ...
0
votes
0answers
20 views

transforming of standardised effect size in MuMIN package

I ran the following model ...
0
votes
1answer
140 views

lmer: standardized regression coefficients

I have analyzed some data (the exact nature of which, I assume, is irrelevant for this question) using linear mixed effects models with the lmer() function from lme4. There has been at least one ...
0
votes
0answers
87 views

Fixed or Random: Hausman test plm vs LRT lmer, Which is the best approach to decide to use random effect?

I have an unbalanced panel data and would like to know which method is better for estimation if I want to capture the heterogeneity of the sample using the plm package or lme4. The sample have year ...
4
votes
1answer
247 views

R: equivalence between an aov between-within repeated measures model and an lmer mixed model

I have some trouble obtaining equivalent results between an aov between-within repeated measures model and an lmer mixed model. ...
0
votes
0answers
17 views

interpreting an interaction of two continuous variables in a mixed effects model [duplicate]

I am hoping for some guidance on how to interpret the interaction in a mixed effects model. The interaction is between two continuous variables (EarlyLanguageExposure and NeighborhoodSize). My ...