Skip to main content

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
0 answers
15 views

Should I use mixed effects model?

I have a sample of real sales data about plant-based products. These data are collected across a monthly period from 2019 to 2023. So I have something like 1-2019, 2-2019, 3-2019, and so on. But they ...
Margherita's user avatar
1 vote
1 answer
26 views

Mixed Effects with repeated measures design and covariate included

I have a dataset that consists of the oxygen consumption (MO2) values for 3 different species of fish. My experiment was a repeated measures design where I measured MO2 of the same 14 fish per species ...
Allison's user avatar
  • 11
2 votes
0 answers
21 views

How to appropriately model complex structured, multivariate data

This is an extension of this question I posted earlier. The general data I introduced there is the same. The structure/nature of my data is: y ... my response variable of interest x ... my main ...
Anke's user avatar
  • 281
0 votes
0 answers
11 views

How do I run the quinidine example in R? [closed]

I'm trying to understand nonlinear mixed effects modeling by following along Pinhiero & Bates 2000. On page 297 they define the call to nlme but use an na.action argument from S called na.include. ...
wdkrnls's user avatar
  • 297
0 votes
0 answers
38 views

(Mixed-)model specification and comparison for testing hypotheses concerning continuous ratings

In a behavioral study following a within-subjects design, subjects of various levels of musicality (years of education) gave continuous liking ratings of three audio stimuli, each under three ...
z8080's user avatar
  • 2,422
1 vote
1 answer
13 views

SPSS mixed effect moderation output

in my conceptul model I want to study if Extroversion trait (Extro IV: likert scale) effects initial offer in a negotiation (Offer DV: any number between 5 and 15), and how does trust moderate this ...
breeks's user avatar
  • 11
1 vote
1 answer
36 views

What is the best approach to look at association between change in X and change in Y?

What is the correct approach to analyze the association between changes in two variables with two synchronous repeated measurements? I have calculated delta change scores for variables X and Y both ...
Aepkr's user avatar
  • 199
1 vote
0 answers
8 views

Interpreting the correlation of fixed effects in a LMM

I calculated a Linear Mixed Model with the dependent variable "interest" that was measured on a scale from 1-7 and three fixed effects threatlevel, extremity and superhumanity that are all ...
Carola S's user avatar
2 votes
0 answers
20 views

R - Not sure about nested factor in linear mixed-effect model (lmer)

I am currently studying the presence of biological markers in post-mortem brains of healthy individuals compared to Alzheimer patients. I am not entirely sure I am using the correct design for my ...
Mat's user avatar
  • 41
0 votes
0 answers
15 views

Flexible covariance structure of the nested term in linear mixed model

Linear mixed model with one grouping factor nested in the other is commonly specified as mod1 below, using the Oats data from ...
Patrick's user avatar
  • 227
3 votes
0 answers
56 views

Including random effect reduces model fit

I am fitting a zero-inflated negative binomial GLMM to model counts. Fixed effects are all categorical except Effort_sq which are non-zero values. The experiment is performed several times within a ...
Alessandra Bielli's user avatar
0 votes
0 answers
14 views

I am trying to fit a mixed-effects model with a proportion as the response. I'm stumped on which distribution fits my model

Currently, this is my best-fit model. dHARMA does not look great. The response has many zeroes and many 1's ...
user412636's user avatar
3 votes
1 answer
41 views

Nested, Crossed or both random effects

I am building a GLMM model with a binomial response variable, and I am having trouble determining which combination or nested or crossed effects to use. My situation is the following: 1.) I have ...
geoscience123's user avatar
0 votes
1 answer
33 views

The repeated measures, mixed effects models

My dataset contains participants who have been treated with intervention or placebo, the outcome is salivaflow (continous) and is measured at 0, 4 and 12 months. The outcome variable ($Y_{i}$) is the ...
A_Carl's user avatar
  • 1
0 votes
0 answers
34 views

Describing data structure and specifying a linear mixed model in nlme with nested and crossed effects

I am trying to specify a linear mixed model to analyse data with the following structure and have several questions about correctly describing the structure of the data and how to specify the model. ...
Pratorum's user avatar
2 votes
1 answer
33 views

Random effects in GAMs with mgcv vs random effects in LMMs with lme4

This blog post considers an example where GAMs from the mgcv package are used to model random effects: ...
Syd Amerikaner's user avatar
1 vote
0 answers
22 views

Plotting model-adjusted baseline values of change scores

I know using change scores to evaluate a treatment effect on an outcome in an RCT is frowned upon by some. But I'm interested in knowing what people normally do when it comes to plotting the model-...
LucaS's user avatar
  • 703
1 vote
1 answer
61 views

Effect size/power analysis of categorical variable in multilevel model

How to decide the effect size of a categorical variable with multiple levels (e.g., three or four) in MLM? And how to calculate the power of such variables using a simulation (or other) approach?
Misaya's user avatar
  • 53
1 vote
2 answers
67 views

ANCOVA or MODERATION?

I'm struggling with the statistics for a question I'm collecting data to answer. My paper is about whether different meditation types can increase happiness when controlling for meaning in life. There ...
Johnny A's user avatar
1 vote
2 answers
88 views

How to model a controlled experiment (three time points, two groups) in lme4?

We conducted a behavior change field experiment using the following variables: Three time points (T0, T1, T2) Two groups (intervention vs. control) Individual ID Workshop ID The intervention was ...
AnnaBosshard's user avatar
1 vote
1 answer
27 views

How do I resolve singularity issues related to my random effect term in LMM

I am trying to run a linear mixed model (LMM) to observe how CH4 and CO2 fluxes change over time. I have a randomized block design with repeated measures over time. I also have an unequal sample size, ...
user avatar
0 votes
0 answers
36 views

Understanding (0 + Days | Subject) in lme4

The vignette "Translating lme4 models to sommer" of the sommer package explains fm1 <- lmer(Reaction ~ Days + (0 + Days | Subject), data=DT) as "...
Patrick's user avatar
  • 227
3 votes
2 answers
55 views

Mixed-effect logistic regression with small sample size: is it possible or do you have alternative solutions?

I want to run a mixed-effect regression model on a few data points. I have 24 participants and 4 trials per participant. I want to include two fixed effects and their interaction in the model, as well ...
chiaras15's user avatar
1 vote
2 answers
86 views

In mixed-effects model, can a variable be both a grouping factor in a random intercept and a fixed effect?

I've come across several discussions on mixed-effects models, yet none seem to address my specific query. From what I've gathered, it appears that the model specification below is correct, allowing a ...
Suhas Bharadwaj's user avatar
0 votes
0 answers
25 views

Interpretation of coefficient for binomial longitudinal outcome in joint models / modeling

When performing joint models of survival and longitudinal outcome, how do we interpret the coefficient when the longitudinal outcome is binomial? In the slides here pp. 131 to 142 https://www....
user3631369's user avatar
0 votes
0 answers
24 views

GLMMs with crossed random effects: How do I quantify the reduction in random effects variance of including fixed effects? Or, indeed, should I?

I am modelling test score outcomes (0/1) using a GLMM with crossed random effects for persons and items. As I add significant fixed effects estimates for person and item, the variance estimate for the ...
Tiptoe's user avatar
  • 1
3 votes
2 answers
75 views

Approximate power analysis for simple linear mixed model without random effects

For educational purposes, a repeated measure of all participants in two conditions is modeled as linear mixed model. We're interested in the difference in outcome while controlling for confounders $...
Madamadam's user avatar
  • 247
0 votes
1 answer
40 views

In blmer, is sigma variable random-effect covariance, and why would cov(r,c)var(r) = var(c)?

As the title says, I have two questions regarding the blmer() models in R. I have tried to get firm understanding about the ...
Imsa's user avatar
  • 43
0 votes
0 answers
9 views

Multilevel/mixed model when group is missing for some of the data

A client has given me a dataset of corn samples gathered from different loads of corn that were delivered to a grain elevator. They are interested in whether the concentration of different fungal ...
qdread's user avatar
  • 295
1 vote
1 answer
35 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
  • 83
4 votes
2 answers
193 views

sample size calculation using G*Power -- which model to use based on an already calculated effect size?

I want to perform a sample size calculation using G*Power. I have 2 predictors and want to test how these 2 predictors affect change over time in a specific cognitive measure. The cognitive measure ...
user412145's user avatar
0 votes
0 answers
31 views

Error less observations than random effects in lmer with time varying covariate

I am running a multilevel growth curve model to examine predictors of social anhedonia (SA) trajectory through ages 12, 15 and 18. SA is a continuous numeric variable. The age variable (Index1) has ...
Jongjay70's user avatar
3 votes
2 answers
65 views

Can't get my head around how random effects affect interpretation of model coefficients

For example, if you are interested in the effect of age on another variable, and you have 3 repeats per individual, but individuals vary in age from the start, is the estimate for age in a random ...
Picapica's user avatar
  • 433
2 votes
0 answers
27 views

Is this multicollinearity, and how can I specify my model better?

I'm analyzing data from the usual care period only of a stepped wedge cluster-randomized trial. The goal is to describe the usual care period as though it was a cohort study because much higher ...
telegraph's user avatar
1 vote
0 answers
17 views

How to combine confidence interval (or standard error, or standard deviation) for the sum of 2 fitted parameters

I am fitting a linear mixed model with the equation: $$ y = \beta_0 + X_1 * \beta_1 + \text{random effects} + \epsilon $$ I use the model to compare difference of means between two groups, $X_1$ is a ...
Lily's user avatar
  • 11
0 votes
0 answers
29 views

Random intercepts model question

I'm working on a paper right now examining the association between undergraduate school cost of attendance and the racial demographics of an institution's student body. My analysis includes separate ...
coinbase_wells's user avatar
0 votes
1 answer
25 views

Advice on writing complex mixed-effect model for a neuroscience experiment

We have done an experiment using optogenetics (a technique to manipulate genetically engineered neurons with light) and are trying to write the proper mixed-effects model. The experiment is as follows:...
jerlich's user avatar
  • 239
0 votes
0 answers
29 views

are fixed effects not being evaluated by the model?

i have a mixed effect model that includes some variables as fixed effects and some as random effects. all of them are defined as factors, and i set appropriate reference levels. var_one includes two ...
gabt's user avatar
  • 207
2 votes
0 answers
65 views

Is it valid to use "withdrew from study" in a mixed model to help with dropout bias in longitudinal data?

Consider the hypothetical dataset where a number of study participants have no change over time in a particular outcome, but their probability to drop out of the study is related to the baseline value ...
Evan's user avatar
  • 225
0 votes
0 answers
33 views

Multilevel Modelling with Crossed and Nested Factors in R

I am trying to create a model to determine the effects of Stations and Circuits (and any interaction) on students scores in an OSCE exam, using the lmer function in R. I have 3 factors: circuit $\beta$...
D Ram's user avatar
  • 1
0 votes
0 answers
13 views

Mixed model for repeated measures logistic regression?

I ran an experiment where participants were randomly assigned to one of two conditions (control vs. treatment). In both conditions they had to make 8 binary choices. That is they were presented two ...
Mina's user avatar
  • 31
1 vote
2 answers
62 views

Mixed model: Which parameters to provide for sample size calculations?

I am currently planning an analysis in a relatively new area of research and would like to provide data that will allow for future power analyses. Unfortunately, I am completely lost in the ...
a.henrietty's user avatar
0 votes
0 answers
23 views

How to extrapolate/forcast data with a linear mixed model

I built a linear mixed model with data from a cohort of patients followed from 3 years before the start of the treatment to 24months after. The variable of interest in their blood pressure. I would ...
Jilano's user avatar
  • 1
1 vote
1 answer
50 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
1 vote
1 answer
22 views

Next steps - variable can't be a fixed and random effect?

I have been trying to run a binomial GLMM on the proportion of emerged seedlings across locations (categorical variable) and over the monitoring period (continous variable). We obtained and planted ...
TruthSeeker4's user avatar
1 vote
1 answer
65 views

Interpretation of generalized linear mixed-effects models: How should I proceed with a significant interaction term?

My experiment has the following factors: "year" (fixed) with levels "1" and "2" "age" (fixed) with levels "old" and "new" "treatment&...
empetrum's user avatar
0 votes
0 answers
26 views

Overcoming posterior correlation for a model with random effects (for a Gibbs sampler)

I am trying to infer parameters for a model of case numbers of different infectious diseases in different locations over time. The model is $$ \log \left(1 + y_{ijt}\right)\sim\mathsf{Normal}\left(\mu ...
Till Hoffmann's user avatar
2 votes
1 answer
83 views

Multi-level models and random effects: Still confused

I know that there are many posts concerning explanations of multi-level models, random effects, fixed effects and so on. But after having read through them, and after watching this youtube series by ...
Always_learning_new_things's user avatar
0 votes
0 answers
11 views

Rank deficiency in a linear mixed model

I have a linear mixed model with 4 fixed factors and 1 random factor: V ~ A + B + C + D + (1|E). I want to compare this model with a model with an additional interaction term. When I add an ...
statuser's user avatar
3 votes
1 answer
74 views

Random effects Models vs Gaussian Log likelihood + explicit grouping features

Let us assume the Gaussian negative log likelihood (like e.g. here https://pytorch.org/docs/stable/generated/torch.nn.GaussianNLLLoss.html) $\text{Gaussian Negative Log Likelihood} = -\frac{1}{n} \...
Ggjj11's user avatar
  • 1,343

1
2 3 4 5
130