# 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.

3,602 questions
Filter by
Sorted by
Tagged with
23 views

### Adjust for correlation within group in linear mixed models

I'm trying to use a linear mixed model for this experimental setup: Students are tested three times, before and after a lecture, and after a pause, at two occasions. I want to test whether age and ...
27 views

### heteroscedasticity in a linear mixed model of longitudinal data

I want to evaluate the effectiveness of a psychological intervention in a RCT. My study consists of 150 subjects. Half of them were assigned to the intervention group. They are nested within three ...
33 views

### Replicate Stata 'variance' and 'robust' in R for mixed effects methods [closed]

I am working with a small dataset of clustered data. The experiment is on mice, testing the efficacy of a substance for neurons cells within mice, and delivery of a fatty acid substance between mice. ...
23 views

### Multiple comparison adjustment with multiple outcomes, measured over time

I am trying to work out the most appropriate way to adjust for multiple comparisons. I have 20 biomarkers which have been measured at 4 timepoints (baseline & three unevenly spaced follow-ups). I ...
23 views

### Satterthwaite degrees of freedom for Linear mixed models

Suppose, I have a mixed model of the form; $Y = X\beta + Zb + \epsilon$ Where $b\sim N(0,D)$ with $D$ being the unknown random effects covariance matrix and $\epsilon\sim N(0,\sigma^2I)$ with $I$ ...
116 views

### Mixed-effect logistic regression with very large dataset

I am conducting linguistic research to determine whether a property of the subject (animacy) of a sentence has its effect on whether a particular kind of preposition phrase will be mentioned. I ...
15 views

### ICC and power for mixed models

I'm simulating data for a mixed model in order to estimate the needed power for a study. I have 3 groups, a control group and two treatment groups. The effect sizes for the two treatment groups are 0....
25 views

### Hypothesis test of two population means with correlated observations

I'd like to run an A/B experiment where my outcome measures are conversion rate, and mean spend. I'd like to use two proportion Z-test and z-test of two population means, however many users in the ...
30 views

### Testing contrasts in multilevel models

I'm trying to think of a way to test certain hypotheses regarding an experiment I've run. It's a 2 x 3 x 4 within-subjects, repeated-measures design. I would like to fit a (cross-classified) ...
23 views

### Panel data regression (R)- temperatures at weather stations correlated across time and across stations

I have a balanced panel dataset with a few dozen weather stations' hourly temperature readings across several decades. I have a measure of population density around the weather station over time as ...
73 views

I'm looking for some references that explain step by step how to model logistic regression to longitudinal data (repeated measurements) in R. I know that I can use the ...
34 views

### Nested random intercept

I am calculating a three level HLM. The first level are the measurement points, the second are subjects and the third therapists. I am investigating the effect of an intervention, which is only ...
25 views

### Mixed models for longitudinal data

I'm starting to study the Linear Mixed Models (LMM) and the Generalized Mixed Models (GLMM) and I got kinda confused. If I want to apply logistic regression to a longitudinal data, I need to add ...
29 views

### Bayesian model comparison vs Bayesian Model criticism

What is the difference between Bayesian model comparison vs Bayesian model criticism? Can someone explain with an example?
66 views

### Model selection for Mixed Effects Regression - Correcting heteroscedasticity

My experiment consist on measuring the root mean squared error (RMSE) between a path and what the participant produces. To produce the trace each participant experiences 3 feedbacks (1st factor - ...
46 views

### Filling missing data points with lmer prediction model

I'm trying to interpolate the missing data point using lmer model prediction. Subsetting to a table without any na to the missing column of interest: ...
47 views

### Ways of modeling the same variable as both a time-invariant and time-varying predictor

This question has been asked and not answered before here. I am building a model attempting to predict heroin use over time in patients based on their use of amphetamine-type substances (ATS). ATS ...
24 views

### Mean-center continuous predictors for GLMMs?

I have a dataset with a non-negative, right-skewed response variable and at least one non-negative, right-skewed predictor. Given the non-Gaussian, non-negative distribution of the predictor variable, ...
61 views

### Interpreting random effects in zero-inflated models

For context, I have a longitudinal study measuring counts of bacterial sequences in human stool collected during a dietary intervention. Initially, I was going model the change in each bacterium (...
72 views

### Obtaining valid win probabilities from contest data using a binomial model

I conducted an enclosure experiment on lizards where I recorded contest outcome for every male-male combat. We had three morphs of lizards (o, w, y) in each enclosure. I am interested in obtaining ...
76 views

### How do I write a mixed-effect regression model (MRM)?

So I am trying to write a MRM with both random intercept and random slope. I know the general model is as follows, yij = b0 + b1xij + vi0 + vi1xij + eij However, I want to actually write my ...
58 views

### What type of statistical analysis to perform?

I have an experiment with 10 subjects. Each of them has to exert force and real-time feedback is received. Each subject experiences all 3 types of feedback (within-subject factor). Moreover, each ...
24 views

### Continuous outcome variable - Select between GEE and Linear Mixed Models

What are the arguments for and against selecting GEE and Linear Mixed Models when the outcome variable is continuous? Are they any circumstances where one performs better than other? The data I am ...
32 views

### Mixed model with panel data when some cases have constant responses (zero) over time

I have a panel data with about 300 units observed over a period of 4 weeks. In each week, I recorded a response that is a binary variable, y, for each unit of that week. For about 50% of the units, ...
64 views

### Can I use location as a random effect when treatment levels are not exactly the same across those locations?

I am working on a data set that aims to test various treatments with respect to vegetation regeneration. The experiment is replicated at many sites across a large geographical gradient and has been ...
25 views

### How to add a covariate in the linear mixed model

I'm creating my LMM including three factors (A,B,C) as fixed effect, and D as the random intercept. At the same time, I also want to include a covariate (E) to test whether the covariate influence the ...
42 views

### Binomial GLMM (GLMER) with proportions in unbalanced, observational panel data: nesting issues and errors

Thanks in advance. I am new to mixed models and having several doubts about a mixed model (lme4's glmer, binomial) with multiple levels, measuring a proportion [0,1] in three time periods. My data ...
18 views

### How do I interpret the posteriors in a skew-normal mixed model?

I ran in brms a model with "skew-normal" link function. I would like to know how to interpret the model output. All my independent variables are scaled. If it was a model with normal link function I ...
24 views

### How to test for differences with multiple observations per subject under the same (level-2) condition?

I'm trying test for the difference in a numeric outcome (WearTime) that was measured 7 times (7 consecutive days) for each subject under the same condition (Season) that was measured at the ...
18 views

### Why not all contrasts showing up? [duplicate]

I have a categorical variable with 3 levels: low, mid, and high. I want to do all-pair comparisons with the following contrasts: ...
5 views

### Assessing variability in a repeated measures study

I want to assess technical variability/dispersion between several same-subject measurements (i.e which groups have more variability): My data consists of a set of cases (with age and sex variables) ...
14 views

### lme4 - which option is the right one? [closed]

Let's say I have an experiment with 5 examinations done at 5 time points (t1..t5), when the subjects are assessed for some continuous variable, say, DV. I want to analyze their change from baseline (...
12 views

### How to analyze repeated-measures between-subject data using R?

I have to analyze data from an study with following design: I measure the subjects' response to a series of stimuli on a 4-level Likert-scale. Each subjects sees 10 different stimuli, but they are the ...
18 views

### Interpretation of between subject factors from a Mixed Models Anova with non-significant within factor effect

I just received results from a 91(Electrode-Combinations) x 2(Groups) x 2(Condition) mixed model ANOVA design, where Condition is the the within-subject factor or more precisely the repeated measures ...
7 views

### Can I do model selection comparing model computed using aov and lmer?

I am interested in model selection and wonder if it is appropriate to compare an anova (generated using aov) to a linear mixed model (generated using lmer) using AIC?
44 views

### Mixed Model Equations

In this paper on page 1924 it is stated that \begin{equation} var(u \mid y) = \sigma^2[G - GZ'H^{-1}ZG] \end{equation} can be written as \begin{equation} var(u \mid y) = \sigma^2[G - (Z'R^{-1}Z + ...
19 views

### Does this allow conclusions about an interaction in a linear mixed model?

I am analysing an experiment where groups received either one type of verum treatment (there are two different types of verum treatment) or a placebo treatment. I want to find out whether the ...
12 views

### Hausmann test for Fixed vs Random Effects Models

I run a fixed and random effects model with the same variables and got similar results. The Hausmann test indicated (=1) that I should use the Random Effects Model. However, when I added a lag ...
27 views

### Likelihood of linear mixed effects model

Consider the following model \left \{ \begin{array}{l} y_i = x_i\beta + z_ib + \varepsilon_i,\\\\ b_i \sim \mathcal N(0, \Sigma), \quad \varepsilon_i \sim \mathcal N(0, \sigma^2), \end{array} \right....
28 views

### Importance of absolute values of the covariance matrix in the nonlinear mixed models

I am fitting a nonlinear mixed model (three-parameter logistic function) without any hierarchical structure. I have adopted an unstructured variance-covariance structure for the random effects. Is it ...
26 views

### Mixed Effects Model Using Censored Data

I am attempting to analyze left-censored hormone data collected in a repeated measures design, and am having some difficulty employing an appropriate method to account for the censored nature of the ...
64 views

21 views

### Model for Panel data with correlated time-invariant variables

after days of reading, I start to get a feeling about the different assumptions, tradeoffs and such for different models. But I still can't find the right answer. I asked a question about the choice ...