Linked Questions
22 questions linked to/from Fixed effect vs random effect when all possibilities are included in a mixed effects model
209 votes
1 answer
173k views
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,...
20 votes
5 answers
29k views
When to use mixed effect model?
Linear Mixed Effects Models are Extensions of Linear Regression models for data that are collected and summarized in groups. The key advantages is the coefficients can vary with respect to one or more ...
27 votes
1 answer
21k views
Why do the estimated values from a Best Linear Unbiased Predictor (BLUP) differ from a Best Linear Unbiased Estimator (BLUE)?
I understand that the difference between them is related to whether the grouping variable in the model is estimated as a fixed or random effect, but it's not clear to me why they are not the same (if ...
17 votes
3 answers
2k views
Should "City" be a fixed or a random effect variable?
I am analyzing data on "BloodSugar" level (dependent variable) and trying to find its relation with "age", "gender" and "weight" (independent variables) of ...
12 votes
4 answers
2k views
Why is it OK to model demographics as random effects in bayesian multilevel models?
In Bayesian multilevel models (with, say, people nested within congressional districts) I sometimes see individual level demographic variables like race modeled as random effects. So here’s a slightly ...
10 votes
3 answers
15k views
What is the intuition on fixed and random effects models? [duplicate]
Now I'm having a hard time having a grasp on the difference between fixed and random effects of regression models. I believe I understand it's recommended to use random effects if you consider ...
7 votes
1 answer
6k views
Linear Mixed model, number of observations per group
I am trying to fit a mixed model with about 45 groups, about 10 of the groups have just one observation and about 10 groups have more than 5 observations. The total number of observations is around ...
7 votes
1 answer
2k views
GLMER sampling random effects
I have a model M calculated via lme4's glmer function, with random effects ("Customer ID") and fixed effects for each customer ID. My dataset is very large, so I would like to select a sample of ...
4 votes
1 answer
2k 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 :) ): ...
5 votes
0 answers
3k views
Predict with stats::lm() versus lme4::lmer()
What are the difference between a linear mixed model with random slope and intercept and a linear model with an interaction effect? If I predict the effect of 1) the main effect and 2) the random ...
4 votes
1 answer
1k views
In a Bayesian Hierarchical Model set-up, what is the definition and difference between random and fixed effects?
I understand that fixed vs. random effects have different meaning whether it be in biostatistics or econometrics. I recently came across a talk regarding fixed vs. random effects in the hierarchical ...
3 votes
1 answer
604 views
What is a Randomized Complete Block Design. How do we create one and analyze it?
I have been reading about experimental design, and Randomized Complete Block designs (RCBD) in particular and I have a few queries. What exactly is a randomized complete block design ? Is there a ...
2 votes
0 answers
2k views
When do I want a random intercept model and when a random slope model?
I am performing a meta-regression of nine studies that look at cancer risk vs level of substance in the drinking water. Each study has a reference strata and one to five higher strata. The studies ...
0 votes
1 answer
589 views
Calculating group mean and confidence interval from single-subject means and confidence intervals
I have a sample of 20 subjects. I have two continuous variables, X and Y which are linearly related. I use linear regression to estimate the regression coefficient relating X and Y. For each subject, ...
5 votes
0 answers
893 views
Longitudinal mixed model: What random effects are possible?
I'm faced with analyzing the following design: In a longitudinal study, the muscle tissue of about 25 subjects are analyzed at 8 timepoints. Specifically, 7 measurements are taken during a race ...