Questions tagged [random-effects-model]

Parameters associated with the particular levels of a covariate are sometimes called the “effects” of the levels. If the levels that are observed represent a random sample from the set of all possible levels we call these effects "random".

Parameters associated with the particular levels of a covariate are sometimes called the “effects” of the levels. If the levels that are observed represent a random sample from the set of all possible levels we call these effects "random."

Reference:

Bates (forthcoming). lme4: Mixed-effects modeling with R.

1404 questions
372
votes
9 answers

What is the difference between fixed effect, random effect and mixed effect models?

In simple terms, how would you explain (perhaps with simple examples) the difference between fixed effect, random effect and mixed effect models?
Andrew
  • 5,478
  • 5
  • 21
  • 21
197
votes
3 answers

R's lmer cheat sheet

There's a lot of discussion going on on this forum about the proper way to specify various hierarchical models using lmer. I thought it would be great to have all the information in one place. A couple of questions to start: How to specify multiple…
149
votes
1 answer

Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4?

Here is how I have understood nested vs. crossed random effects: Nested random effects occur when a lower level factor appears only within a particular level of an upper level factor. For example, pupils within classes at a fixed point in time.…
62
votes
3 answers

Questions about how random effects are specified in lmer

I recently measured how the meaning of a new word is acquired over repeated exposures (practice: day 1 to day 10) by measuring ERPs (EEGs) when the word was viewed in different contexts. I also controlled properties of the context, for instance, its…
alwin hoff
  • 621
  • 1
  • 6
  • 3
56
votes
2 answers

What is a difference between random effects-, fixed effects- and marginal model?

I am trying to expand my knowledge of statistics. I come from a physical sciences background with a "recipe based" approach to statistical testing, where we say is it continuous, is it normally distributed -- OLS regression. In my reading I have…
N26
  • 1,705
  • 3
  • 18
  • 22
42
votes
2 answers

How can I test whether a random effect is significant?

I am trying to understand when to use a random effect and when it is unnecessary. Ive been told a rule of thumb is if you have 4 or more groups/individuals which I do (15 individual moose). Some of those moose were experimented on 2 or 3 times for…
Kerry
  • 1,129
  • 3
  • 14
  • 20
39
votes
1 answer

What are easy to interpret, goodness of fit measures for linear mixed effects models?

I am currently using the R package lme4. I am using a linear mixed effects models with random effects: library(lme4) mod1 <- lmer(r1 ~ (1 | site), data = sample_set) #Only random effects mod2 <- lmer(r1 ~ p1 + (1 | site), data = sample_set) #One…
mjburns
  • 1,077
  • 3
  • 12
  • 16
32
votes
5 answers

Modelling longitudinal data where the effect of time varies in functional form between individuals

Context: Imagine you had a longitudinal study which measured a dependent variable (DV) once a week for 20 weeks on 200 participants. Although I'm interested in general, typical DVs that I'm thinking of include job performance following hire or…
Jeromy Anglim
  • 42,044
  • 23
  • 146
  • 250
29
votes
1 answer

Specifying multiple (separate) random effects in lme

I was working in R packages nlme and lme4, trying to specify the models with multiple random effects. I found, that only nlme allows to specify the heterogeneous structure of the variance. Therefore, I got a model, where temperature (Y) depends on…
Slava
  • 671
  • 1
  • 6
  • 8
29
votes
3 answers

Sample size calculation for mixed models

I am wondering if there are any methods for calculating sample size in mixed models? I'm using lmer in R to fit the models (I have random slopes and intercepts).
29
votes
5 answers

How can I include random effects (or repeated measures) into a randomForest

I'm not even sure that the question makes much sense, but I think I saw a couple of titles of papers where they proposed random forest with random effects. Is this possible in R?
mguzmann
  • 575
  • 1
  • 6
  • 14
28
votes
2 answers

In a multi-level model, what are the practical implications of estimating versus not-estimating random effect correlation parameters?

In a multi-level model, what are the practical and interpretation-related implications of estimating versus not-estimating random effect correlation parameters? The practical reason for asking this is that in the lmer framework in R, there is no…
russellpierce
  • 17,079
  • 16
  • 67
  • 98
28
votes
5 answers

What is the mathematical difference between random- and fixed-effects?

I have found a lot on the internet regarding the interpretation of random- and fixed-effects. However I could not get a source pinning down the following: What is the mathematical difference between random- and fixed-effects? By that I mean the…
28
votes
2 answers

REML or ML to compare two mixed effects models with differing fixed effects, but with the same random effect?

Background: Note: My data set and R code are included below text I wish to use AIC to compare two mixed effects models generated using the lme4 package in R. Each model has one fixed effect and one random effect. The fixed effect differs between…
27
votes
5 answers

What is the upside of treating a factor as random in a mixed model?

I have a problem embracing the benefits of labeling a model factor as random for a few reasons. To me it appears like in almost all cases the optimal solution is to treat all of the factors as fixed. First, the distinction of fixed vs random is…
1
2 3
93 94