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
0
votes
0 answers

Issues with powerSim: new levels detected in new data: 120, 125, 336, 347"

I'm running into an issue where I receive the following error when trying to use powerSim to estimate power for my multilevel model. All my variables including DV and IV are continuous variables. Here are my codes for my model and powerSim. #sample…
0
votes
0 answers

Factoranalysis in Multilevel Model in R

Unfortunately, I can't find literature on how to conduct factor analyses in a multilevel design (with individuals, countries and time as hierarchical levels) in R. The factors are suggested to be on the individual level. Could anyone help?
Wibi
  • 1
0
votes
0 answers

R MICE failing on 2l.pmm. How do I resolve Error in sort.int(d, partial = donors) : index 5 outside bounds?

Apologies if this is a simple solution, but I am trying to figure out how to resolve this. I am trying to impute multi-level data, where level 1 predictors have missing values. (see sample at the end) In doing imputation the states (level 2 cluster…
Villinger
  • 1
  • 2
0
votes
1 answer

How does the metafor aggregate() function affect single-outcome studies in a multi-level meta-analysis?

I'm currently conducting a meta-analysis study. In my study, there are several studies that reported multiple outcomes. According to the literature, I figured out that the multilevel meta-analysis could be a good way to combine these multiple…
0
votes
0 answers

How can I replicate a HLM model in R using these equations?

I'd like to replicate a Multilevel Model (MLM) using R with the below equations. Level 1: Y = Betaoj + Beta1jX1 + Beta2jX2 + Beta3j*(X1*X2) + Beta4j(X3) + rij Level 2: Beta0j = g00 + g01 (Sector) + u0j Beta1j = g10 + g11 (Sector) + u1j Beta2j = g20…
AH26
  • 3
  • 2
0
votes
0 answers

Is there an R function that resembles the metobit command of Stata?

I am trying to run a multilevel mixed-effects Tobit regression in Rstudio but I can't find a way to do it. My dataset comprises transfers (in euros) to Italian regions from 1989 to 2018 and other several economic and political variables. The…
daddo
  • 11
0
votes
1 answer

IRT anaylsis with imputed datasets in 'mice' library and pooling the item parameters

I have "0=incorrect" and "1=correct" coded questionnaire, including 28 questions. There are missing data and I imputed the missing data with the Multiple Imputation method. After having multiple imputations from the mice library, I want to get the…
0
votes
0 answers

lme() in R - Linear mixed model for repeated-measures design. Fit independent slopes to determine associations within levels of the repeated measure?

I did an experiment in which 30 people listened to 3 songs ("A", "B", and "C") in a random order. For each participant and song, I got the mean "body temperature" and the mean "heart rate" during the listening task. This is, I have a…
Rachel A.
  • 1
  • 2
0
votes
0 answers

Problems running GLM with count data

I'm using eBird count data to try and look at changes in bird distributions over time throughout the urban gradient. I'm an undergrad so my stats level is pretty limited. I took the relative count (observed count/total count in a year) of…
Eco10008
  • 1
  • 1
0
votes
0 answers

Multilevel generalized linear models after multiple imputation

I am performing multilevel generalized linear models after multiple imputations however I got an error, my variables are: dm2: continuous variable fld5: categorical variable (5 categories) age: continuous variable gender: categorical variable (2…
Bkry
  • 1
  • 1
0
votes
0 answers

Multiple imputation for longitudinal data with 2l.pan or panImpute (mice package in R)

I have a longitudinal (panel) data frame called tradep_red in long format that contains 200 countries (country), 26 years (year), the continuous dependent variable gini and 2 continuous predictor variables (trade and unempl, in reality there are 13…
0
votes
0 answers

How to calculate r2 for multilevel analyses (longitudinal)

I would like to calculate r2 for this multilevel model (longitudional). "Mzp" means time, which is a dummy-coded variable (mzp.D1, mzp.D2 - simple contrasts). slope.outcome.simple.con <- lme(MKG.IS ~ mzp.D1 + mzp.D2 + MKG.TREAT_2 +…
0
votes
2 answers

Adding random noise to a group level variable

I'm performing multilevel analysis and, to check for statistical artifacts, I want to create new group level variables adding random noise to some group level variables (like school-level socioeconomic composition). In R, the jitter() function…
AlejandroDGR
  • 178
  • 1
  • 10
0
votes
1 answer

R mice package error: "Error in .imputation.level2 ... clusteres with partially missing level-2 data"

I am trying to use the mice package to run multiple imputation for many variables in my dataset. This data is multi-level, as each observation has a person and a team attached to it. Some variables should vary within a person and by team, while…
poppiytt
  • 35
  • 3
0
votes
1 answer

Plotting hour values on the y-axis - ggplot

I have a database called data_clean. Participants completed multiple surveys across 10 days. One of the variables (distress) is a categorical variable that includes hours and minutes (e.g. 1:00, 23:15, 2:45). This variable is defined in a…