Questions tagged [multilevel-analysis]

Statistical methods appropriate for the analysis of data sets comprising several levels of hierarchy of units of analysis (e.g., students nested in classes nested in schools; observations nested in patients nested in hospitals). If you can refer to more specific models like mixed-model or glmm, please do so.

Overview

"Multilevel analysis is a general term referring to statistical methods appropriate for the analysis of data sets comprising several types of unit of analysis. The levels in the multilevel analysis are another name for the different types of unit of analysis. Each level of analysis will correspond to a population, so that multilevel studies will refer to several populations..."

-T.A.B. Snijders, Multilevel Analysis, p. 673-677 in M. Lewis-Beck, A.E. Bryman, and T.F. Liao (eds.), The SAGE Encyclopedia of Social Science Research Methods (Volume II). Sage, 2003.

Related tags

  • for linear multilevel models, or HLMs
  • for models with random intercepts
  • for models with random intercepts and slopes
  • for generalized linear mixed models (binary, ordinal, count response)
  • and for R implementations
  • for Stata implementation
  • for Bayesian models comprising several levels of hierarchy of priors and hyperpriors

Please use these tags to make your question more specific and easier to find.

164 questions
1
vote
0 answers

caterpillar plot for cross classified random effects

I have a cross-classified model as the following. I would like to plot the random effects of nonprofit on the industry level to a caterpillar plot. What are the steps? Thanks! M <- lmer(salary ~…
Shicun Cui
  • 11
  • 1
1
vote
1 answer

How to do a marginal model analysis in R?

Problem. I'd like to do a marginal model analysis in R--I think it is sometimes called population averaged model, marginal multilevel model or marginal linear regression model. However, I can't find any information on stackoverflow, Google, or…
rempsyc
  • 785
  • 5
  • 24
1
vote
1 answer

Multilevel mediation analysis (2-1-1-2 mediation) in R

I aim to perform a 2-1-1-2 mediation analysis with Trait A being the IV, Trait B being the DV (both on Level 2) and both State A and State B being two Level-1 mediators. I assume the Level-1-mediators to be correlated. My data is experience sampling…
Marie B.
  • 119
  • 1
  • 7
1
vote
2 answers

How to calculate regression residuals in R for each individual in a longitudinal analysis?

I am working on a longitudinal/repeated measures multilevel model (MLM). Usually, for time-varying covariates (in my case "weekly gross income/1000"), you would calculate a person-mean centered version of the variable (i.e. deducting the person-year…
aspark2020
  • 341
  • 2
  • 17
1
vote
0 answers

ANOVA result is inconsistent (AIC VS deviance)

I am working on GLM models (using glmer). Now I am exploring whether I need an interaction term. I'd like to find the best model, but the following result is confusing: Models: g1: y ~ year + (1 | BZR/PLR) g2: y ~ year + year * BZR + (1 |…
1
vote
0 answers

Multilevel Moderated Mediation in b path

currently I am dealing with the following problem: I have a mediation model which I want to test in my multilevel data X (=Stress) Y (=Flow) Mediator (=Stress-related behavior) Moderator 1 (=Personality Factor 1) Moderator 2 (=Personality Factor 2)…
Gina W.
  • 11
  • 2
1
vote
0 answers

Plotting multilevel model coefficients in R

I am fitting a 2-level model in R using lme4 for a dataset with multiple election surveys. Im using household income by quintile (ordinal, 5 categories) to predict an outcome variable on the individual level, with individuals nested in survey years.…
roeljb
  • 11
  • 1
1
vote
0 answers

Hierarchical Bayes with bayesm: two second-levels

Currently I am implementing a Hierarchical Bayes model with panel data for I stores with T weeks, and where my dependent variable is sales of a brand. I aim to relate store-characteristics to the explanatory variables I am using, but I wish to have…
1
vote
0 answers

modelling interaction terms in random effects and coding of daytime in growth models lme4

I have a question regarding model setup in R and after a long and thorough search I did not find a thread answering either of my two questions: Im gonna describe the setup first: Its a repeated measures dataset with two different interventions (food…
mrie
  • 11
  • 1
1
vote
0 answers

stan number of effective sample size

I reproduced the results of a hierarchical model using the rethinking package with just rstan() and I am just curious why n_eff is not closer. Here is the model with random intercepts for 2 groups (intercept_x2) using the rethinking…
0
votes
0 answers

Controlling for variables in multilevel logistic regression modeling

I am new to mixed models and want to calculate a binary mixed model. However, I can't make much sense of the results and am hoping someone can help me out. So I want to calculate the probability of a hit (correctly recognizing an image) as a…
0
votes
0 answers

How to incorporate robust standard erros in multi-level model (MLM) using lme4

I am using lme4 package to build a multi-level model. It can be said that my data has three levels: company level, industry level, year level. However, adding all three levels in a model returns a singular fit. That is why I am thinking of leaving…
Egor
  • 35
  • 3
0
votes
0 answers

Survival analysis and multilevel logistic regression

I want to do a survival analysis using a discrete time multilevel model in Stata, because the data I have is subject to heaping at certain ages (which explains the discrete time) and because the data I have is hierarchal (children are nested in…
0
votes
0 answers

mice creates NaN and NA after imputing cluster-level variable for clustered data with maxit >0

I have clustered data with 21% missing values in the cluster variable, which was derived from a 'date' variable with similar missing data. I'm trying to impute the missing data in the cluster variable without imputing anything else. No other…
0
votes
1 answer

How to prepare and merge diary data (experience sampling method)?

I have an initial survey (demongraphic,code as time 0) and 10 days of diary survey (time 1 - time 10) data. I am trying to merge initial data and diary data together and then add a column to give the time sequence for each participants. For example,…
Shawna
  • 1