All Questions
3,082 questions
440
votes
9
answers
894k
views
What is the difference between fixed effect, random effect in mixed effect models?
In simple terms, how would you explain (perhaps with simple examples) the difference between fixed effect, random effect in mixed effect models?
233
votes
3
answers
198k
views
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 ...
202
votes
1
answer
162k
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 ...
64
votes
2
answers
68k
views
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 ...
46
votes
4
answers
80k
views
Standard error clustering in R (either manually or in plm)
I am trying to understand standard error "clustering" and how to execute in R (it is trivial in Stata). In R I have been unsuccessful using either plm or writing my ...
46
votes
7
answers
24k
views
How to deal with hierarchical / nested data in machine learning
I'll explain my problem with an example. Suppose you want to predict the income of an individual given some attributes: {Age, Gender, Country, Region, City}. You have a training dataset like so
<...
42
votes
4
answers
80k
views
When to use fixed effects vs using cluster SEs?
Suppose you have a single cross-section of data where individuals are located within groups (e.g. students within schools) and you wish to estimate a model of the form ...
42
votes
8
answers
26k
views
Under what conditions should one use multilevel/hierarchical analysis?
Under which conditions should someone consider using multilevel/hierarchical analysis as opposed to more basic/traditional analyses (e.g., ANOVA, OLS regression, etc.)? Are there any situations in ...
41
votes
3
answers
10k
views
What's the relation between hierarchical models, neural networks, graphical models, bayesian networks?
They all seem to represent random variables by the nodes and (in)dependence via the (possibly directed) edges. I'm esp interested in a bayesian's point-of-view.
36
votes
2
answers
15k
views
What's the difference between "deep learning" and multilevel/hierarchical modeling?
Is "deep learning" just another term for multilevel/hierarchical modeling?
I'm much more familiar with the latter than the former, but from what I can tell, the primary difference is not in their ...
35
votes
2
answers
54k
views
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 ...
32
votes
3
answers
31k
views
What does "independent observations" mean?
I'm trying to understand what the assumption of independent observations means. Some definitions are:
"Two events are independent if and only if $P(a \cap b) = P(a) * P(b)$." (Statistical Terms ...
31
votes
5
answers
8k
views
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 ...
30
votes
1
answer
30k
views
Incidental parameter problem
I always struggle to get the true essence of the incidental parameter problem. I read in several occasions that the fixed effects estimators of nonlinear panel data models can be severely biased ...
30
votes
5
answers
5k
views
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.
...
25
votes
2
answers
15k
views
Why is a $p(\sigma^2)\sim\text{IG(0.001, 0.001)}$ prior on variance considered weak?
Background
One of the most commonly used weak prior on variance is the inverse-gamma with parameters $\alpha =0.001, \beta=0.001$ (Gelman 2006).
However, this distribution has a 90%CI of ...
25
votes
3
answers
624
views
Equations in the news: Translating a multi-level model to a general audience
The New York Times has a long comment on the 'value-added' teacher evaluation system being used to give feedback to New York City educators. The lede is the equation used to calculate the scores - ...
22
votes
4
answers
12k
views
How to calculate the confidence interval of the mean of means?
Imagine that you repeat an experiment three times. In each experiment, you collect triplicate measurements. The triplicates tend to be fairly close together, compared to the differences among the ...
22
votes
2
answers
836
views
Fisher information in a hierarchical model
Given the following hierarchical model,
$$
X \sim {\mathcal N}(\mu,1),
$$
and,
$$
\mu \sim {\rm Laplace}(0, c)
$$
where $\mathcal{N}(\cdot,\cdot)$ is a normal distribution. Is there a way to get an ...
21
votes
2
answers
5k
views
Big disagreement in the slope estimate when groups are treated as random vs. fixed in a mixed model
I understand that we use random effects (or mixed effects) models when we believe that some model parameter(s) vary randomly across some grouping factor. I have a desire to fit a model where the ...
21
votes
6
answers
13k
views
R package for multilevel structural equation modeling?
I want to test a multi-stage path model (e.g., A predicts B, B predicts C, C predicts D) where all of my variables are individual observations nested within groups. So far I've been doing this through ...
21
votes
1
answer
21k
views
Difference between multilevel modelling and mixed effects models?
What is the difference between Multilevel/Hierarchical Modelling and Mixed Effects Models?
Wikipedia considers them to be the same, i.e. two different names for the same thing. But I think they are ...
20
votes
5
answers
19k
views
Fixed effect vs random effect when all possibilities are included in a mixed effects model
In a mixed effects model the recommendation is to use a fixed effect to estimate a parameter if all possible levels are included (e.g., both males and females). It is further recommended to use a ...
20
votes
3
answers
13k
views
Random forest on multi-level/hierarchical-structured data
I am quite new to machine learning, CART-techniques and the like, and I hope my naivete isn't too obvious.
How does Random Forest handle multi-level/hierarchical data structures (for example when ...
20
votes
1
answer
5k
views
Clustered standard errors vs. multilevel modeling?
I've skimmed through several books (Raudenbush & Bryk, Snijders & Bosker, Gelman & Hill, etc.) and several articles (Gelman, Jusko, Primo & Jacobsmeier, etc.), and I still haven't ...
19
votes
4
answers
33k
views
How to keep time invariant variables in a fixed effects model
I have data on a large Italian firm's employees over ten years and I would like to see how the gender gap in male-female earnings has changed over time. For this purpose I run pooled OLS:
$$
y_{it} = ...
18
votes
1
answer
2k
views
How to respond to reviewers asking for p-values in bayesian multilevel model?
We were asked by a reviewer to provide p-values as to better understand the model estimates in our bayesian multilevel model. The model is a typical model of multiple observations per participant in ...
17
votes
3
answers
9k
views
Concepts behind fixed/random effects models
Can someone help me to understand fixed/random effect models? You may either explain in your own way if you have digested these concepts or direct me to the resource (book, notes, website) with ...
17
votes
3
answers
29k
views
Difference-in-differences with individual level panel data
What is the correct way to specify a difference in difference model with individual level panel data?
Here is the setup: Assume that I have individual-level panel data embedded in cities for multiple ...
17
votes
2
answers
57k
views
Difference between one-way and two-way fixed effects, and their estimation
Consider a basic linear unobserved effect panel data model, e.g.:
$$Y_{it}=\beta x'_{it}+c_i+\lambda_t+u_{it}, \quad t=1,\dots,T$$
where the vector $x_{it}$ contains the independent variables and $u_{...
17
votes
1
answer
8k
views
Compute partial $\eta^2$ for all fixed effects anovas from a lme4 model
Disclamer: I wasn't sure where to post this question: CV or SO, but eventually decided to try here first
I've been asked by one of the reviewers to add effects sizes (preferably $\eta^2_p$ which is ...
17
votes
1
answer
3k
views
Writing out the mathematical equation for a multilevel mixed effects model
The CV Question
I'm trying to give (a) detailed and concise mathematical representation(s) of a mixed effects model. I am using the lme4 package in R. What is the ...
16
votes
4
answers
610
views
How can I improve my analysis of the effects of reputation on voting?
Recently I had done some analysis of the effects of reputation on upvotes (see the blog-post), and subsequently I had a few questions about possibly more enlightening (or more appropriate) analysis ...
16
votes
2
answers
10k
views
How is ARMA/ARIMA related to mixed effects modeling?
In panel data analysis, I have used multi-level models with random/mixed effects to deal with auto-correlation issues (i.e., observations are clustered within individuals over time) with other ...
16
votes
1
answer
23k
views
Product Demand Forecasting for Thousands of Products Across Multiple Stores
I'm currently working on a demand forecasting task, with data on tens of thousands of products across a couple thousand stores. More specifically,I have a few years' worth of daily sales data per ...
16
votes
1
answer
13k
views
When is it necessary to include the lag of the dependent variable in a regression model and which lag?
The data we want to use as dependent variable looks like this (it is count data). We fear that since it has a cyclic component and trend structure the regression turns out to be biased somehow.
We ...
15
votes
1
answer
12k
views
OLS with clustered standard errors vs. multilevel modeling when the main interest is at the individual level [duplicate]
Possible Duplicate:
Under what conditions should one use multilevel/hierarchical analysis?
I have been reading various papers dealing with multilevel analysis, and to be honest, I am still ...
15
votes
3
answers
5k
views
Removing factors from a 3-way ANOVA table
In a recent paper, I fitted a three-way fixed effects model. Since one of the factors wasn't significant (p > 0.1), I removed it and refitted the model with two fixed effects and an interaction.
I'...
15
votes
1
answer
41k
views
difference-in-differences with fixed effects
I have two questions related to having fixed effects in the DD model.
I have a treatment that occurs at different times (e.g., 2001, 2005, etc.).
I want to fit a DD model, so I standardize the ...
15
votes
3
answers
6k
views
Is the Mundlak fixed effects procedure applicable for logistic regression with dummies?
I have a dataset with 8000 clusters and 4 million observations. Unfortunately my statistical software, Stata, runs rather slowly when using its panel data function for logistic regression: ...
15
votes
1
answer
85k
views
Panel Data: Pooled OLS vs. RE vs. FE Effects
We had some discussion about the usefullness of Pooled-OLS and RE Estimators compared to FE.
So as far as I can tell, the Pooled OLS estimation is simply an OLS technique run on Panel data. Therefore ...
14
votes
5
answers
4k
views
What precisely does it mean to borrow information?
I often people them talk about information borrowing or information sharing in Bayesian hierarchical models. I can't seem to get a straight answer about what this actually means and if it is unique to ...
14
votes
2
answers
5k
views
Is multilevel modelling simpler, more practical, or more convenient using Bayesian methods or frequentist methods?
In this community wiki page a twice-upvoted comment asserted by @probabilityislogic asserted that "Multi-level modelling is definitely easier for bayesian, especially conceptually." Is that true, and ...
14
votes
3
answers
5k
views
Illustrative datasets and analysis for multilevel modelling
I recently took an introductory course on multilevel modelling. Most of the datasets and examples we used were from the social sciences. I've just got a 2 week internship in a biostatistics department,...
14
votes
3
answers
5k
views
Multilevel model vs. separate models for each level
What are the advantages and disadvantages of running separate models vs. multilevel modeling?
More particularly, suppose a study examined patients nested within doctors' practices nested within ...
14
votes
2
answers
5k
views
Why use a beta distribution on the Bernoulli parameter for hierarchical logistic regression?
I'm currently reading Kruschke's excellent "Doing Bayesian Data Analysis" book. However, the chapter on hierarchical logistic regression (Chapter 20) is somewhat confusing.
Figure 20.2 describes a ...
14
votes
2
answers
4k
views
Hierarchical Bayesian Model (?)
Please apologize my butchering of statistical lingo :) I have found a couple of questions on here that are related to advertising and click through rates. But none of them helped me very much with my ...
14
votes
2
answers
2k
views
Is there a method for constructing decision trees that takes account of structured/hierarchical/multilevel predictors?
Is there a method for constructing decision trees that takes account of structured/hierarchical/multilevel predictors, that would allow me to impose domain knowledge or constraints on interactions for ...
14
votes
2
answers
928
views
What is the Frequentist definition of fixed effects?
Bolker (2015) writes on p. 313 that
Frequentists and Bayesians define random effects somewhat differently, which affects
the way they use them. Frequentists define random effects as categorical ...
14
votes
1
answer
2k
views
Comparison of the jacknife vs the bootstrap
I am interested in understanding the relative pros and cons of bootstrap versus jacknife resampling. Both are used in iterative algorithmic approaches to estimating the precision of a prediction or ...