Questions tagged [mixed-model]

Mixed (aka multilevel or hierarchical) models are linear models that include both fixed effects and random effects. They are used to model longitudinal or nested data.

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

Dynamic panel model assessing temporal relationships with 2 conditions with varying timepoints

I want to perform a dynamic panel model to investigate the temporal relationship between 2 variables (working mechanism and outcome) using R package dpm (following the method of Allison, Williams, and ...
4
votes
1answer
30 views

How do I approach a linear mixed effects model with a 2-level group?

My data looks something like this: ...
1
vote
0answers
19 views

Hierarchical linear model in the context of an experiment

In an experimental study, I randomly assign participants to one of two conditions: Condition A (which they read Text A), and Condition B (in which they read Text B). After reading their assigned text, ...
3
votes
2answers
54 views

Sample size calculation for linear regression model with random intercept

I am trying to calculate the sample size for a mixed linear regression model. The dependent variable is continuous and the model includes 2 further continuous variables. The random intercept is based ...
0
votes
0answers
16 views

Calculating Variance of the LogOR for within subjects studies for a meta-analysis [duplicate]

I would like to add to a meta analysis both studies with between and within subject design, but for the latter I don't know how to calculate the variance of the logOR. I found an answer here But what ...
3
votes
1answer
59 views

How do we obtain p values from a robust mixed regression model in R?

I have yet to find an answer to this problem, so here goes. I am fitting a robust mixed regression model using the robustlmm package on R. Unlike the lme4 package, from which we can obtain p values ...
3
votes
1answer
50 views

Simulating Outcomes from a Random Effects Model - Strange Behavior when Changing Number of Effects

I've have been doing my best to generate observations from a random effects model so that I can compare estimates of parameters to true parameters for a variety of conditions (like number of random ...
2
votes
1answer
108 views

GLMM - assumptions and repeated measures in R

I am trying to run a GLMM - binomial logit. I have four independent variables ($x_1$, $x_2$, $x_3$, $x_4$) and a dependent variable ($y$) - all factors (where $'0'=$no, $'1'=$yes). ...
2
votes
1answer
54 views

Comparing linear mixed-effect models with unequal sample sizes?

I performed a mixed-effect linear regression on two models in R: i <- lme(ICC ~ CONDITION + LAB + COG, random=class/student, data=data1, na.action=na.omit) ...
0
votes
0answers
32 views

Help lme4. The p-value, obtained from the stargazer-table, where from is it computed? What does it say?

I am using the stargazer R package to produce a table to present my result from a linear mixed model. Have two questions: What does the log likelihood tell me? I ...
1
vote
0answers
15 views

Help on determining the effect of a drug in tumor counts in a within subject design

Thank you all in advance, I am having difficulties in deciding the best way to determine the effect of a treatment from observational data (there are no RCTs available). I have an observational cohort ...
4
votes
1answer
40 views

Why does centering variable A influence my p values of factor B in the linear mixed effects model?

I have a dataset, where I would like to see whether there is a group difference in the measurement "concentration". I have repeated measurements for some subjects, which is why I use a mixed-...
5
votes
1answer
56 views

Which regression model should be preferred when multiple measures are taken for each subject?

I have 50 subjects. Each subject has a tendency to fall, and I'm interested in the time it takes for me to come help them after they fall. I want to see if the time it takes for me to help a subject ...
1
vote
1answer
18 views

Mixed effects model with cross random effects and nested random effects

I'm a beginner with Mixed effects model, and I'm having a hard time trying to fit the model to my data. My data has the following properties : I have two disjointed groups of participants All ...
2
votes
1answer
48 views

fixed effects vs random effects vs random intercept model

This might sound a repetitive question but after reading many articles and posts online, I could never understand it entirely. I read somewhere that a random intercept model is a type of random effect ...
1
vote
0answers
33 views

multilevel model specification

We had participants complete a virtual maze. We showed the participants the correct path through the maze, then had them complete the maze 10 times. The maze consisted of 15 decision points, which are ...
1
vote
0answers
32 views

Can regression to the mean be corrected by linear mixed effects?

I am wondering if regression to the mean can be corrected by using linear mixed effects models in the following case. ...
3
votes
1answer
104 views

Mixed model dfbetas procedure question

I have two questions that I will explain in detail and give an example: When iteratively calculating dfbetas in a linear-mixed model and creating a fixed-effect dummy variable to remove the influence ...
4
votes
1answer
45 views

Is it a must to include a random slope in a mixed model?

I am learning about fitting mixed models and I find when it is justified to include or exclude a random slope rather confusing. Some tutorials suggest that although the maximal random structure should ...
1
vote
0answers
37 views

Binomial GLMM and model predictions. Is this method correct?

I have a question concerning the statistical validity of methods. I have data about the survival probabilities of vegetative and reproductive structures of a plant along the flowering time. I am ...
3
votes
2answers
66 views

Which ICC estimator to use under the fixed effects model?

In the random effects model $$y_{ij} = \mu + \alpha_j + x_{ij} + \epsilon_{ij}$$ the intra-class correlation coefficient is given by $$ICC = \frac{\sigma_{\alpha}}{\sigma_{\alpha}+\sigma_{\epsilon}}$$ ...
0
votes
0answers
9 views

Outcome difference between Lmer in R and Lmer from pymer4

I've noticed that when implementing a 4-way interaction in a mixed-effects model in both R and pymer4, there was a difference in outcomes only when a fourth interaction term was specified. THe ...
1
vote
0answers
13 views

Linear mixed models: reference about effect sizes debate

I have heard many times over that there is "ample debate" about whether or not effect sizes (and also p-values) for linear mixed models should be computed and how they should be computed. Is ...
2
votes
0answers
19 views

Issues with random effects: what to do when analyzing sites with all 0's or all 1's?

I'm analyzing data that looks at the survival of artificial bird nests under different treatments. These nests were grouped across 80 sites, with 6 nests per site. I have created a binomial model on R ...
7
votes
1answer
60 views

Interpreting a zero-inflation negative binomial model

I am currently running a series of zero-inflated negative binomial models on the impact of the magnitude and direction of change in various weather parameters on a number of insect behaviours (...
5
votes
1answer
41 views

Why does this error occur with my linear mixed models?

I am attempting to run linear mixed effects models using the function lmer() in order to analyse the effect of the direction of change (single categorical fixed effect) in weather parameters over a ...
0
votes
0answers
9 views

R Fixed Effects Model: Breaking Independence Assumption?

I have data of countries, years and some variables as shown below (not the comeplete dataset): ...
1
vote
2answers
40 views

How many fixed factors can be entered in a linear mixed effects model?

My data set has 60 participants. Data was collected from each of them 3 times over seven months, and at each time, each participant did two types of speaking tasks (monologic and dialogic). So my ...
0
votes
0answers
25 views

How to correct the model for a change in data collection methodology?

I am modeling longitudinal data (sales at different stores across some span of months) with a mixed model. The data is collected by going to the physical store and annotating all the useful features (...
3
votes
1answer
51 views

Not reaching convergence with mixed model

I've got a study in which patients (record_id) can have from 1 to 5 aneurysms (concurrently) and each may be treated differently (each aneurysm). We are interested ...
1
vote
1answer
96 views

Standard Errors for LS Means

In Python, I'm trying to validate the LS means from a mixed model that I ran with R's lme4 after using the lsmeans library. I'm using Python's mixedlm() from statsmodels. I've successfully obtained ...
3
votes
1answer
32 views

Confused on results from mixed model

I've got a study in which patients can have from 1 to 5 aneurysms (concurrently) and each may be treated differently (each aneurysm). We are interested to see whether one treatment is different than ...
0
votes
0answers
22 views

Why do contrasts influence singular fits with mixed models?

I've fit a linear mixed effects model to some data in R with afex::mixed. I'm interested in the fixed effect and have no expectations for the random effects ...
2
votes
1answer
64 views

Crossed or nested random effects in a repeated measures and a between-subject design?

After reading a lot of material on nested and crossed effects, I am still unsure on whether the random effects in my design are nested or crossed. I would really appreciate advice from some more ...
1
vote
1answer
94 views

Why significant predictors are different for two highly correlated dependent variables?

I am using linear mixed-effects (LME) models to investigate the longitudinal effects of maternal factors on infant adiposity indices. Infant adiposity was measured at 3-time points (birth, 3 months ...
0
votes
0answers
24 views

joint model using JM returning error “aeqSurv exception, an interval has effective length 0”

Hello and thank you for your help. I am trying to fit a joint model, using syntax ...
0
votes
0answers
7 views

Is the mvt (multivariate t) adjustment for multiplicity appropriate for repeated measures and longitudinal trials?

As in the title. If I have a longitudinal experiment with t0...tn timepoints, and want to verify the Dunnett contrast (all versus baseline), can I use the mvt adjustment for multiplicity? I think it ...
0
votes
0answers
13 views

GEE or fixed effect regression with clustered SE

What should be considered when choosing between GEE for repeated measure (panel) data, and generalised linear models with clustered (on individuals) sandwich variance estimator? For example, change in ...
4
votes
1answer
80 views

Nested and crossed effects in 3-way interaction in lmer

I am running a mixed model in lmer, testing the effects of Covid restrictions on sleep, comparing 2 cohorts of individuals- one from 2019 and one from 2020, coded 0/1 (between subjects). Each ...
3
votes
1answer
50 views

R lmer model: add factors or reduce factors

In mixed effect models, do you add factors one by one? Or do you reduce the factors one by one? What I am doing is as follows. Are there any problems with the steps? Build a full model: ...
0
votes
0answers
44 views

Need help interprete lmm result - One fixed effect one random effect

I am investigating the difference in size between pike fry during their emigration period out from their nursery area. My hypothesis is that bigger fry tend to force smaller sized fry to migrate due ...
0
votes
0answers
7 views

Deriving the variance of the difference between 2 effects of the whole plot factor in the Split Plot Design

In the split plot design, there are 2 factors of interest: $A$ with the $k$ levels $a_1,..a_k$ and $B$ with the $m$ levels $b_1,...b_m$ and there are $n$ replicates and consider $k \times n$ whole ...
1
vote
0answers
22 views

Including AR(1) in growth model makes intercept constant (R nlme)

I have data of countries, years and some variables as shown below (not the comeplete dataset): ...
3
votes
1answer
103 views

R lmer model: degree of freedom and chi square values are zero

I have built the following models: ...
4
votes
1answer
41 views

How different from one does a dispersion ratio have to be to be considered significant?

I am in the process of conducting zero-inflated generalised mixed effects models with Poisson distributions and have been using the testDispersion() function of the DHARMa package in R to determine if ...
2
votes
0answers
64 views

glmer (lme4) vs meglm (Stata)

I'm trying to fit a binomial GLMM, but I'm ending up with very different results between lme4 and Stata. In R, I'm running ...
1
vote
0answers
28 views

Two factorial time series mixed effect model using lmer

I'm facing a problem regarding the the selection of an appropriate model and right synthax using lmer()-command (lme4-package). But first let me explain the design of the study: Study design: I ran an ...
0
votes
0answers
21 views

Mixed Effects in R: Intercept varying among g1 and g2 within g1

Trying to make this model work. Final Answer is an ordered categorical variable, 1-4. X1 and X2 are factors that are either 0 or 1. ResponseId is a factor with one of 419 values - it's the ID of each ...
3
votes
1answer
33 views

Multilevel model with longitudinal repeated measures

I'm relatively new to mixed linear models. I have a dataset of education data measuring classroom behaviours (continuous dependent variable) during two different learning activities (categorical ...
2
votes
1answer
34 views

R longitudinal growth curve model/multilvel model with time-varying covariate structure (nlme)

I have data of countries, years and some variables as shown below: ...

1 2 3
4
5
89