Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

Derive gamma-parameters from preset R^2 in mixed models

For a simulation study in R, I want to select the effect sizes according to a preset $R^2$. Consider this two level random intercept mixed model, with one L1 predictor $X_{ij}$ and one L2 predictor $...
Linus's user avatar
  • 153
0 votes
0 answers
24 views

Multilevel Model in R

I have data from a study in which 19 participants (9 males, 10 females) have each completed 4 jumping conditions (BW, 20, 25, 30) whilst I have measured joint level data for the hip, knee and ankle. I ...
teli95's user avatar
  • 1
0 votes
0 answers
12 views

mice multilevel imputation: does specifying cluster variable ("-2" in predictor Matrix) without multilevel methods lead to cluster robust imputation?

In short: Are mice's imputations cluster robust when I only specify the cluster variable with "-2" in the predictor matrix but do not use multilevel models during imputation? For clustered ...
JannisB's user avatar
0 votes
1 answer
33 views

Mediation models require a sigma matrix that is symmetric

I'm trying to fit the following reproducible mediation model called final. But I get an error saying: sigma must be a symmetric matrix Could you please advise how ...
Simon Harmel's user avatar
8 votes
1 answer
471 views

Power analysis for three-level multilevel models in R

For a study in a social science setting - where huge number of participants are not easily available - I'm trying to do a power analysis for a three-level multilevel design. There are few packages ...
Linus's user avatar
  • 153
1 vote
0 answers
56 views

Error in lmerTest: The random-effects parameters and the residual variance (or scale parameter) are probably unidentifiable

I know that there have been similar questions before, but I dont still get it. I would like to estimate a multilevel model with repeated measures in R using the package “lmerTest”. The model ...
Ineluki's user avatar
  • 11
2 votes
0 answers
39 views

Can I Perform a Micro Synthetic Control Analysis with Different Aggregation Levels for Treatment and Control Groups?

I am conducting an analysis using the microsynth package in R to evaluate the impact of increased police presence on various outcome measures obtained from an official survey. My treatment areas ...
DeMelkbroer's user avatar
1 vote
1 answer
26 views

Setting predictor variables with 3-levels in multilevel mode

I am working with a random intercept multilevel modeling. I want to predict general health based on survey data. The survey uses nested data set on three levels: individual, county, and state. I am ...
YouLocalRUser's user avatar
3 votes
1 answer
48 views

Mixed Model: Translation from mathematical notation to R's lmer() - package: lmerTest

The following data should be generated and fitted to a mixed model (for further simulation studies): $y$: outcome of clinical study (effect of medication) indiv individuals = 20 repl replicate ...
m09s19's user avatar
  • 95
2 votes
1 answer
35 views

Experimental condition with multilevel model

I am working with a survey experiment. The data is set at three levels: individual, county, and state. The experimental condition was randomized at the individual level 1. That is, some individuals in ...
YouLocalRUser's user avatar
0 votes
1 answer
48 views

Estimating a (purposely) misspecified multilevel model in R using frequentist statistics with MCMC/BS and getting cluster-specific effects and CIs

Dear Stackoverflow friends, I have a challenging task. I am trying to purposely (for research/teaching) estimate a misspecified multilevel model and retrieve its cluster-specific estimates and CIs ...
Udi Alter's user avatar
2 votes
1 answer
38 views

Seeking recommendations for R Packages for Multilevel Mediation Analysis with Binary Mediator

I am conducting a research study and aim to investigate the relationship between dietary habits (independent variable) and academic performance (dependent variable) of adolescents, with ...
blakchat's user avatar
1 vote
1 answer
161 views

Can Lavaan handle multigroup multilevel SEM?

I am wondering if it is possible to run a multigroup, multilevel SEM in Lavaan. I can run the analysis just as a multigroup and just as a multilevel, but when I try to specify both cluster and group, ...
Amie Gordon's user avatar
0 votes
1 answer
44 views

Multi-level Linear Mixed Model: Sampling and Power Issues

I am struggling to find a proper model for my analysis, and on top of this, I have some questions about the number of observations and the resulting power of the model. Experiment I ran a reaction ...
OJ432's user avatar
  • 1
5 votes
2 answers
276 views

Clarification on Random Effects Structure in Linear Mixed Models in R

I am using linear mixed models to analyze a dataset with a hierarchical structure, where measurements over time (level 1) are clustered within individuals (level 2), and individuals are clustered ...
Pashtun's user avatar
  • 315
2 votes
1 answer
133 views

Why estimated population variance differs from estimated $\sigma^2 + \tau^2$ in this random effects ANOVA?

A random effects ANOVA model is typically written as $Y_{ij} = \gamma_{00} + u_{0j} + \epsilon_{ij}$ . and the total variance of the outcome variable is decomposed into $var(Y_{ij}) = \tau^2 + \sigma^...
user1205901 - Слава Україні's user avatar
1 vote
0 answers
69 views

Bread freshness in bread basket, Multi-Level Analysis in R; 2 time points [closed]

This is my first attempt with multi-level analysis. My research question is; How does the freshness of different types of bread (6 level) within a bread basket, change over two time points (ranging 4-...
Jackson's user avatar
  • 11
0 votes
0 answers
30 views

Is it appropriate to calculate odds ratios from random effects glmm output?

Is it appropriate to calculate odds ratios from random effects glmm output? about the data: grown (binary): whether flower grows over a certain height (TRUE/FALSE)...
user avatar
4 votes
2 answers
251 views

Mixed Model for Repeated Measurement (mmrm) - Assumptions

I want to fit a mixed model for repeated measures (mmrm) on a set of panel data with 6 visits and N = 1200. I want to estimate the effect of time passing on the outcome, without any intervention since ...
Lea's user avatar
  • 145
3 votes
1 answer
111 views

How to fit random slope hierarchical model as SEM with OpenMx in R?

I've been exploring the OpenMx Package in R in hopes to fit multilevel path analysis and I can't figure out how to add random slope. This is the model I am trying to fit: $$ Y_{ij} = \beta_{0j} + \...
Vefeagins's user avatar
  • 704
1 vote
1 answer
55 views

Understanding lme4 output: Unexpected different results [closed]

I am teaching myself how to do multi-level models (MLMs) in R. I have two models, which I think should give me the same information (with some omissions in M2), but they are not completely the same. I ...
grace.cutler's user avatar
2 votes
0 answers
33 views

How to fit a GLMM with multiple levels of nesting

I have some data I am struggling to process at the moment. I have landed on using generalized linear mixed models (GLMMs), but I am having a very hard time wrapping my head around it. I have a large ...
Joseph's user avatar
  • 21
3 votes
0 answers
18 views

How to nest multilevel model (or to nest at all)?

I'm trying to handle some data and get some insights from it. The data includes a binary outcome variable, so I am using glmer. The relationship is whether age groups are more likely to engage in the ...
Scott's user avatar
  • 31
0 votes
1 answer
44 views

Random effect variance with or without fixed-effects intercept

I'm fitting some hierarchical models in R using lmer, and am trying to understand why the results change as they do when I either include or exclude a fixed-effects ...
neurobot's user avatar
1 vote
0 answers
45 views

Understanding equatiomatic output

I have fit a lmer model as follows: ...
Rabin KC's user avatar
3 votes
1 answer
613 views

How to add interaction and covariates to linear mixed effects model in R

I have some data ($x$ and $y$) collected over multiple days for multiple people. I want to test whether the contemporaneous associations between $x$ and $y$ (measured daily) is stronger depending on ...
Lavdoy's user avatar
  • 31
1 vote
0 answers
275 views

How to perform multilevel moderated mediation analysis with {mediate}

I'm attempted to run a multilevel moderated mediation analysis in R using the mediate package. Some details on my sample: I have an experimentally manipulated ...
Ethan Milne's user avatar
0 votes
0 answers
97 views

Conducting a moderated multilevel mediation with more than two levels in R

I'm trying to conduct a moderated multilevel mediation model in R, but I'm still a pretty junior graduate student and I've only ever done mediation with lavaan. My outcome variable is cortisol, for ...
calexico's user avatar
2 votes
2 answers
214 views

Mixed-effects model of nested time series [closed]

I have time series data for a variable from different climate models, each with multiple runs using different initial conditions (ensemble members). A small subset of the data to see how its laid out (...
Elio Campitelli's user avatar
0 votes
0 answers
78 views

Calculate the average marginal effect (AME) in the multilevel regression with glmmTMB package

I am writing this message because I want to calculate the average marginal effects (AME) in order to be able to interpret an interaction resulting from a multilevel regression. However, I am finding ...
Jules's user avatar
  • 11
4 votes
1 answer
123 views

What it means to model the residuals of a multilevel model?

I have a highly skewed dataset. But, my MODEL of choice below shows drastically improved, normally distributed residuals (and predicted values) compared to other models whose residuals are not modeled....
Simon Harmel's user avatar
1 vote
1 answer
65 views

Modelling 3-level MLM of longitudinal data in R

I have two questions regarding modeling a 3-level multilevel model in R. I have a dataset of different variables that were assessed 4x as part of a longitudinal study. At each of the four assessments ...
Eve's user avatar
  • 11
2 votes
1 answer
80 views

Interpretation of random effects in mixed model with glmer()

I'm working on a final project and need to estimate a multilevel logistic model for analyzing dropout rates in higher education in a specific region. The model has three levels, where intercepts vary ...
gustavobrp's user avatar
0 votes
0 answers
22 views

High Type 1 Errors in Power Analysis by Simulation for Null Effect with Multilevel Ordinal Regression with Cumulative Link Model

I am doing a power analysis for an experiment where we will fit a cumulative link model for ordinal regression. But when I do the power analysis, my power for the null effect is between 20% and 30%. ...
chasmani's user avatar
  • 165
0 votes
1 answer
50 views

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 ...
Sternengezuecht's user avatar
3 votes
0 answers
415 views

How should I specify a multi-level moderated mediation in lavaan?

I have a repeated measures crossover design where two treatments were delivered to all participants, and measurements of the mediator M and outcome Y were taken following each treatment. I also have a ...
Ben Smith's user avatar
0 votes
0 answers
32 views

When, why and how to use random slopes with three-way cross-level interactions in multilevel models? [duplicate]

I am trying to estimate a hierarchical (random/fixed/mixed?) model with cross-level interactions and I can't wrap my head around if, how and where and why I should include random intercepts and slopes....
hlm_guest's user avatar
0 votes
0 answers
148 views

Simulating hierarchical / multi-level data for regression analysis in R

I want to simulate a dataset whereby I have a continuous variable that represents a response to treatment (normally distributed). The dataset should also include sex (50:50) and age (normally ...
Jack Box's user avatar
0 votes
0 answers
67 views

Spatial Regression with variables at different spatial levels - multilevel regression necessary?

Is it possible to calculate a spatial regression with variables at different spatial levels WITHOUT any aggregation/disaggregation? Or is it necessary to consider the multilevel regression? dependent ...
Mapos's user avatar
  • 141
1 vote
1 answer
114 views

R - How to Address Small Number of Groups in Multilevel Logistic Regression?

I'm implementing a multilevel logistic regression model in R to predict a binary courtroom decision with 8 categorical and 7 numerical predictors. I believe a multilevel model to be appropriate ...
galaxy-friday1017's user avatar
2 votes
0 answers
40 views

How to compare the fit of two multilevel models which only differ in their fixed effects?

I have two models looking like this, where just the fixed effects differ, but the random effects stay the same ...
Bila's user avatar
  • 31
1 vote
0 answers
20 views

How can I take into account multiple individuals with multiple observations across a data?

I have a set of data as this: ID V1 V2 V3 A 12 10 8 A 11 9 10 B 7 10 8 C 13 10 9 C 10 12 6 This dataset is from health data, where each individual takes ...
Jorge A's user avatar
  • 107
2 votes
1 answer
54 views

How to structure higher level effect (between clusters) in mixed-effect models

I am working on a multilevel analysis aiming to investigate factors that impact student GPA. The data comes from 16 different schools. To include school effects, we are using a mixed effect model (...
Rcs1917's user avatar
  • 31
4 votes
2 answers
1k views

Why are Bayesian mixed-effects models (e.g., brms) more able to estimate complex models than Frequentist mixed models (e.g., lme4)?

It is commonly suggested that if you are having trouble getting your lme4, Frequentist mixed-effects model to converge, you can either (a) simplify and drop random effects in the model, or (b) pivot ...
JElder's user avatar
  • 1,252
0 votes
0 answers
62 views

Advice for modeling variance in a hierarchical linear model

I have a dataset of longitudinal measurements for different sample individuals, with some covariates such as age, sex, time period, etc. The number of measurements taken for each individual varies. I ...
Mir Henglin's user avatar
0 votes
1 answer
63 views

Between-person level interaction

I have a database called dat1. Each participant (id) had multiple measurements. One of the variables measures type of the stress called stress_type (acute=0, chronic =1) and another variable is the ...
MAIMAU's user avatar
  • 11
2 votes
1 answer
602 views

brms model specification with 3 (crossed or nested?) levels

I have a data set that looks like this toy data ...
lilla's user avatar
  • 43
0 votes
0 answers
60 views

Multilevel model with interaction effect in R

I'm fairly new to statistical analysis, but was told to use a multilevel model for my research purpose. I am interested in investigating whether attitudes on the EU integration are different for left ...
Stephan's user avatar
0 votes
1 answer
62 views

Can I disentangle an interaction in a multilevel model by reordering factors?

I have a multilevel model with two factors (factor A - 2 levels; factor B - 3 levels) and continuous covariate, all of which interact. There is a random effect of participant and random slopes on the ...
Hu12345's user avatar
  • 15
2 votes
0 answers
79 views

Comparing proportions of parts between 3 groups

I'm trying to compare the effect of treatment on fruit size grades over a number of harvests (time groups). I have applied 3 treatments (10ppm, 5ppm and control), each treatment had 3 replicas of 4 ...
B.Shermeister's user avatar

1
2 3 4 5
10