All Questions
186 questions
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 $...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
1
vote
0
answers
45
views
Understanding equatiomatic output
I have fit a lmer model as follows:
...
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 ...
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 (...
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....
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 ...
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....
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 ...
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 ...
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
...
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 (...
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 ...
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 ...
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 ...
0
votes
1
answer
165
views
LMM (lme4) model specification with random slopes
I have a dependent variable Y recording a score on participants which performed a task measured at three time points. I would like to model the data using a LMM ...
0
votes
0
answers
43
views
mixed model with fixed y for each ID
I have an experiment in which mice roam a maze with different environments. My predictors are environment (env) A, B and C, and exploration time at each environment ...
1
vote
0
answers
47
views
Variance of random effects in lmer output
Consider this simple simulated dataset (all groups are normally distributed with sd=1) made up by 4 level 1 groups (lv1) and 2 level 2 groups. The mean of the 4 distribution is 5, 15, 5 and 15 ...
1
vote
0
answers
54
views
Fitting a longitudinal three-level in lme4 with multiple informants
I am trying to fit a multilevel longitudinal model and I am not sure how to conceptualize the structure and how to specify it with lme4 notation.
My outcome of interest is the child's internalized ...
1
vote
1
answer
78
views
How do I specify which variables are at which levels in a hierarchical linear model?
A reviewer has suggested I do a hierarchical linear model for a journal article, but none of the tutorials I could find online: (Example: 1, 2, 3, 4...) were helpful.
I want to construct a ...
0
votes
1
answer
217
views
Multi-level mixed effects model - intercept insignificant
I am running a multi-level model in R, and the results suggest that the intercept is highly non-significant p = 0.9, but that two of the variables are significant. All the variables are Likert scores ...
1
vote
1
answer
178
views
Estimation of random intercept and random slope for singleton cluster in multilevel modeling
I am performing some multilevel analyses with the R package lme4.
The study design is longitudinal with the hierachical structure of observations (L1) nested into study participants (L2). I have 215 ...
1
vote
0
answers
1k
views
FIML (full information maximum likelihood) in R for Missing Data in Multilevel Model
Has anyone been able to find any package/function to run FIML in R for multilevel models? I know the lavaan package has a function for it, but it doesn't support MLM. I've only been able to find it in ...
1
vote
1
answer
111
views
MLM in R: build up procedure, is it ok to add all predictors at once?
I am a novice when it comes to MLM, but had to try my best for my master thesis. Hopefully you can help me with my following study:
I conducted a study with n = 56 participants (interpreters). The ...
0
votes
0
answers
71
views
Looking for advice on analysis plan using a mixed linear regression model
I am writing the preregistration for a study and I wanted to check whether my analysis plan can be improved.
Data description
I attached a picture of some random example data to give you a sense of my ...
2
votes
0
answers
30
views
is ok to use the same variable in two hierarchies?
I have a dataset with two levels: the city level and person level, at the city level i have the categorical variable "poverty level", in my research estimating the effect of the "...
1
vote
1
answer
374
views
Repeated measures with nested data in R
Previously, I conducted a model like the following. I have repeated measures (Time factor: pre-post) of depressive mood in two different groups (Group factor: neutral and experimental). Each ...
2
votes
1
answer
995
views
Difficulty of specifying a within-group correlation structure in a linear mixed-effects model
Suppose we have a dataset generated in R - the response variable val is structured with three factors ...
0
votes
1
answer
283
views
Is standardize always necessary when predictors having very different scales?
I am running a two-level mixed model, where individual economic status and GDP per capita (PPP) are predictors, and subjective well-being (SWB) is outcome.
Two predictors (economic status, PPP) are ...
2
votes
0
answers
57
views
Distinguishing between a predictor's between and within contributions
Suppose $X$ is a continuous predictor that can vary between studies and outcomes in a 3-level linear mixed model like:
...
4
votes
1
answer
3k
views
The interpretation of time-varying covariate in linear mixed effects model
I was wondering how the interpretation of a time-varying covariate in a linear mixed effects model differs from from that of a time-independent covariate?
For example, how does the interpretation of $\...
5
votes
1
answer
233
views
Multilevel Model or Simple Correlation Coefficients
I am interested in the relationship of several variables (questionnaire score = q1 (0-24); physiological measures = phys) across consecutive conditions (block = 4 consecutive conditions) and between ...
5
votes
2
answers
211
views
Choosing a linear model to take into account multiple observations from the same individuals
I’m looking at how temperature varies across age. Can you help me to choose the most appropriate linear model to this analysis?
I’ve got multiple measures from 1 individual per age (13 in total), and ...
5
votes
3
answers
702
views
Can fixed-effects become biased due to random structure misspecification
I'm following-up on this great answer. Essentially, I was wondering how could misspecification of random-effects bias the estimates of fixed-effects?
So, can the same set of fixed-effect coefficients ...
3
votes
1
answer
433
views
Does the interpretation of fixed effects depend on random-effects specification? (example provided)
Imagine a dataset where there are 3 nested grouping variables: study $>$ group $>$ ...
4
votes
1
answer
114
views
Types of correlations between two observations when random effects are crossed
On page 378 of Raudenbush & Bryk's (2002) book, they recognize 3 possible types of correlations among two observations given two (fully or partially) crossed random effects (i.e., neighborhood &...
4
votes
1
answer
678
views
Adding a random effect for a categorical variable
I'm following up on this great answer. Given the structure of my data (below), is it possible to add a random-effect for H (a cluster ID variable) and ...
0
votes
1
answer
146
views
Determining when groups differ in repeated measures linear mixed model
I have two groups of individuals, each individual has a score measured multiple times and I have constructed a mixed model as follows with both individual slopes and intercepts allowed to vary:
...
3
votes
1
answer
62
views
Intercept in mixed model with multiple multilevel factors
I am using a mixed model to predict the effect of certain environmental exposures on brain region measures. So temp[, j] gives the brain region our regressor and <...
1
vote
0
answers
658
views
Fixed effect in linear mixed model becomes non-significant when model is reduced
I set up a linear mixed effects model with lme4 to test an interaction of two fixed effects condition1 and condition2 both with 2 levels and both manipulated within persons and items. In the study, ...
1
vote
1
answer
398
views
Multilevel (nested) model with paired data
I am new to multilevel models and I have the following experimental design:
I have 3 treatments. For each treatment, a group of families that have twins are taken. Some measure, for example height, ...