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
1answer
32 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
29 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
18 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
0answers
19 views

Holding random effects variance constant in PROC MIXED vs lmer [migrated]

I was wondering if it is possible to hold random effects variances constant in R's lme or ...
1
vote
1answer
21 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
37 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
19 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
55 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
26 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
414 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
41 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
30 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
69 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
17 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
15 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
93 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
29 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
66 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
213 views

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

Consider the following data from a two-way within subjects design: ...
2
votes
1answer
123 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
13 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
70 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
49 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
54 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
18 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
62 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
33 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
53 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
24 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
57 views

graphical representation of fixed effects from lmer

I have run a lmer model in R: ...
4
votes
1answer
165 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
57 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
17 views

transforming of standardised effect size in MuMIN package

I ran the following model ...
0
votes
1answer
110 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
72 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
238 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
15 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 ...
0
votes
0answers
78 views

Changing reference level/re-leveling contrasts changes results in non-convergence

I have a question regarding re-leveling in lme4 1.1-7. Experimental Design: Our experiment is an eyetracking while reading study (single sentence stimuli). We are analyzing four different ...
2
votes
1answer
97 views

Using the same variable as a fixed and random effect in Mixed Effect Models

The experiment this data comes from an experiment where two people collaborate to put objects in a specific order. The Direction has the target array on their screen, and the Matcher has a scrambled ...
4
votes
2answers
140 views

How many random effects to specify in lmer?

I ran a computer-based experiment in which there were two within-subject factors, A and B. So all participants got multiple trials in each A*B cell. There was also one between subject factor, C. I'm ...
1
vote
1answer
141 views

Interpreting a linear mixed effect model's interaction term

I am a biologist and am attempting to analyze the effects of time and location on depth. I was told I needed to use a mixed effects model to account for the random variables of Individual and tracking ...
1
vote
1answer
167 views

Specifying Cross-Level Interactions in LMER

I am trying to figure out if it's okay to specify cross-level interactions in a hierarchical model with fixed effect predictor variables at both levels using the ...
0
votes
0answers
12 views

Specifying Cross-Level Interactions in LMER [duplicate]

I am trying to figure out if it's okay to specify cross-level interactions in a hierarchical model with fixed effect predictor variables at both levels using the lmer function, and, if so, how to do ...
0
votes
0answers
65 views

lmer4, p-values, confidence intervals and bootstrapping

I have a mixed linear model made with lmer in R and find that my qq-plot looks rather much like the symbol of a famous superhero. My x-parameters are all factors but I have tried all transformations I ...
0
votes
0answers
54 views

Correlations of fixed effects in logit mixed model with a nested fixed effect

I am using lme4 in R to fit a logistic mixed effects model of psycholinguistic data with three categorial (binary) fixed effects and two crossed random factors (subjects; items). The critical ...
2
votes
0answers
26 views

use many lms or random effects (lmer) to estimate a bunch of slopes?

I have what is probably a very simple question, but I just need someone to verify my thinking. I have a dataset that consists of a variable (var1) measured at 3 time points for about 80 people. At ...
0
votes
1answer
300 views

F stats for post hoc test of a linear mixed effects model

I have an unbalanced linear mixed effects model with three fixed factors of various levels and one random factor for my repeated measures data (for details see here). Thanks to your help I managed to ...
1
vote
1answer
113 views

Summarizing and plotting several combined relationships with LMER

I want to see if there is a significant relationship between predictor and value. I've measured these two variables in 6 different conditions (not a full 3 x 3 design because feature1 and feature2 ...
0
votes
1answer
69 views

In which order should factors be removed when performing model simplification (lmer)?

I am a bachelor student in biology and for a project work, I have a model with a design like this (A, B & C are fixed factors, D is random and nested in C): ...
1
vote
0answers
79 views

lmer - interpreting fixed effects correlation matrix

I fitted four mixed linear models for 4 DVs, and 5 IVs in each of these models as fixed effects (there is a random effect as well). These 5 IVs are "time" (weeks from 1-12, 12 levels), and 4 measures ...