All Questions
2,981 questions
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 ...
52
votes
2
answers
131k
views
Dealing with singular fit in mixed models
Let's say we have a model
...
47
votes
2
answers
77k
views
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 ...
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
<...
44
votes
1
answer
18k
views
How do you deal with "nested" variables in a regression model?
Consider a statistical problem where you have a response variable that you want to describe conditional on an explanatory ...
42
votes
3
answers
68k
views
Difference between generalized linear models & generalized linear mixed models
I am wondering what the differences are between mixed and unmixed GLMs. For instance, in SPSS the drop down menu allows users to fit either:
...
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.
37
votes
2
answers
36k
views
Diagnostics for generalized linear (mixed) models (specifically residuals)
I am currently struggling with finding the right model for difficult count data (dependent variable). I have tried various different models (mixed effects models are necessary for my kind of data) ...
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
41k
views
Why do I get zero variance of a random effect in my mixed model, despite some variation in the data?
We’ve run a mixed effects logistic regression using the following syntax;
...
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
2
answers
98k
views
r glmer warnings: model fails to converge & model is nearly unidentifiable
I have seen questions about this on this forum, and I have also asked it myself in a previous post but I still haven't been able to solve my problem. Therefore I am trying again, formulating the ...
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 - ...
24
votes
2
answers
26k
views
How to apply binomial GLMM (glmer) to percentages rather than yes-no counts?
I have a repeated-measures experiment where the dependent variable is a percentage, and I have multiple factors as independent variables. I'd like to use glmer from ...
24
votes
1
answer
39k
views
Fitting a binomial GLMM (glmer) to a response variable that is a proportion or fraction
I'm hoping somebody can help with what I think is a relatively simple question, and I think I know the answer but without confirmation it has become something I just can't be certain of.
I have some ...
22
votes
5
answers
25k
views
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
I have a GLMM with a binomial distribution and a logit link function and I have the feeling that an important aspect of the data is not well represented in the model.
To test this, I would like to ...
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
837
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
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
19k
views
How to fit a mixed model with response variable between 0 and 1?
I am trying to use lme4::glmer() to fit a binomial generalized mixed model (GLMM) with dependent variable that is not binary, but a continuous variable between zero ...
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
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
2
answers
15k
views
Random effect equal to 0 in generalized linear mixed model [duplicate]
Sorry if I'm missing something very obvious here but I am new to mixed effect modelling.
I am trying to model a binomial presence/absence response as a function of percentages of habitat within the ...
19
votes
1
answer
3k
views
How are PQL, REML, ML, Laplace, Gauss-Hermite related to each other?
While learning about the Generalized Linear Mixed Models, I often see the above terms. Sometimes it seems to me these are separate methods of estimation of (fixed? random? both?) effects, but when I ...
19
votes
1
answer
7k
views
Meaning of a convergence warning in glmer
I am using the glmer function from the lme4 package in R, and I'm using the bobyqa optimizer ...
19
votes
2
answers
10k
views
How will random effects with only 1 observation affect a generalized linear mixed model?
I have a data set in which the variable I'd like to use as a random effect only has a single observation for some levels. Based on the answers to previous questions, I've gathered that, in principle, ...
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
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 ...
17
votes
1
answer
4k
views
Gamma hurdle model for continuous response?
I am modelling invertebrate.biomass ~ habitat.type * calendar.day + habitat.type * calendar.day ^ 2, with a random intercept of ...
16
votes
1
answer
18k
views
Marginal model versus random-effects model – how to choose between them? An advice for a layman
In searching for any info about marginal model and random-effects model, and how to choose between them, I have found some info but it was more-or-less mathematical abstract explanation (like for ...
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 ...
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
1
answer
9k
views
Why are random effects assumed to follow a normal distribution in (G)LMMs?
In short, my question is as follows:
Why is it common to assume normally distributed random effects (especially in generalized linear mixed models)?
A longer version:
Under some circumstances, an ...
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
1
answer
16k
views
Calculating ICC for random-effects logistic regression
I'm running a logistic regression model in the form:
lmer(response~1+(1|site), family=binomial, REML = FALSE)
Normally I would calculate the ICC from the ...
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 ...
13
votes
1
answer
11k
views
What are Hommel Hochberg corrections?
I have recently been introduced to to Hommel Hochberg corrections. I am trying to find a simple explanation about what this actually is/does, but am having no luck. Can anyone please give a brief and ...
13
votes
3
answers
19k
views
Standardized beta weights for a multilevel regression
How can one obtain standardized (fixed effect) regression weights from a multilevel regression?
And, as an "add-on": What is the easiest way to obtain these standardized weights from a ...