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

4,228 questions
Filter by
Sorted by
Tagged with
9 views

### Given that $X\mid Z=j \sim \mathrm N(\mu_j, \sigma_j) \ j=1,2$ derive the likelihood function of $X$ [duplicate]

Consider the concrete example where we flip a coin, with probabilities $\tau$ and $1- \tau$ for heads and tails respectively, and then let $X$ be the random outcome of a normal distribution whose ...
12 views

### Is a random intercept multilevel model the same as a fixed effects model?

Let's say I have the study time and test performance of a group of students who are clustered as classes. Is using a multilevel model (student, class) the same as using a fixed-effects model, where ...
14 views

### How to deal with interactions between fixed predictors when designing linear mixed effects models in R?

I have a longitudinal dataset where I'm building an lmer model using 5 fixed predictors with a random effect for subjects. One of the fixed predictors is Diagnosis ( there are three different ...
16 views

### Assessing impact of concurrent interventions on time series data

I am hoping to assess which interventions create the most change in multiple response variables. What makes this problem more complicated than typical intervention analysis is the concurrent nature of ...
23 views

### How do I treat my Confounding variables in my multivariate Linear Mixed Model?

I'm trying to build a linear mixed model for 5 outcome variables ... Cholesterol 1,Cholesterol 2,Cholesterol 3,Cholesterol 4,Cholesterol 5 which will be melted into a single Cholesterol variable, ...
8 views

### LmeControl(opt = “optim”) - Easy explanation?

Could anyone explain to me with simple words why do we need sometimes this control = lmeControl(opt = "optim")) for a LME model to work please? Thanks
5 views

...
32 views

### lmer after Box-Cox transformation

Are the residuals close enough to normality after Box Cox transformation using the MASS package? ...
57 views

### glmmTMB: AR1 models fail to converge

I am trying to utilize the first-order autocorrelation [AR(1)] covariance structure abilities of the glmmTMB package (described here by Kasper Kristensen) to model experimental time series data ...
43 views

### Why are the covariate terms suppressed in mixed effects model and ANOVA?

I am used to seeing the linear mixed-effects model in the form: $$Y_{ij} = \mu + \alpha_i + \gamma_j + (\alpha\gamma)_{ij} + \epsilon_{ij}$$ assuming $\gamma_j i.i.d \sim N(0,\sigma^2_{\gamma})$ ...
61 views

### Likelihood ratio test for mixed effects model

I'm currently struggling with how to assess the type I error of a permutation test for significance of variance term in R. The idea that I want to follow is outlined below: Suppose we simulate data ...
13 views

### Model between-subject condition as population effect or random intercept?

I have an experiment where participants were assigned to one of four conditions (between-subject), and I want to predict a binary outcome (is_correct). Each ...
47 views

### Non-significant ANOVA interaction term despite 95% confidence intervals not overlapping

I plotted the means and 95% confidence intervals for survival data with the paired bars corresponding to 2 different study sites that each contain two experimental treatments (white = low shelter, ...
30 views

### glmer with gamma distribution - problem fitting model

I am trying to fit the gamma distribution to my data as the residuals are not normally distributed but it has been much more difficult than I anticipated. The dependent variable is response times and ...
34 views

22 views

### Analysing change scores via linear mixed effects model with baseline adjustment?

I am still trying to find a model for a large dataset, approximately 1-5 measurements per patient (over time), one is the baseline value at t=0. The researcher is interested in the change over time ...
27 views

### Regarding modelling longitudinal variables using Two stage mixed effects modeling

I have a question about the basic understating of key statistical methodology. I came across the idea about two stage modelling to incorporate longitudinal predictors. Lets say there is a continuous ...
22 views

### Is there any harm in including all predictors of interest in an lmer() model?

I have a study in which ~60 participants rating a subset of 200 items. I have four potential predictors that I would like to use to predict those ratings. I will run an lmer() model including random ...
26 views

### What is the best method to determine significance in a zero-inflated poisson model?

I am currently trying to run a zero inflated mixed effects model in R using the package glmmTMB following a significant test of zero-inflation (using the function testZeroInflation() in the package ...
30 views

### LRT comparing a random effects model and nested logistic regression model

I have a logistic regression model of the structure y ~ x1 + x2, and a generalized linear mixed model (GLMM) with random intercept and random slope, of the ...
20 views

### LMM: fixed effect significant in complex model, but not in reduced model

I constructed two models with lme4::lmer: decomposition ~ trait1 + trait2 + trait3 + (1|pair) all trait effects are highly ...
32 views

### Mixed effects/nested model giving different EMS tables in R and Minitab, and I believe Minitab is incorrect. Anyone know why it would be wrong?

I have a dataset at https://docs.google.com/spreadsheets/d/1PB_S7oX2Tqgz_BEUUcHfLOww0cNJ-IgN6B34UTequlw/edit?usp=sharing that shows a mixed model where Machine and Station are fixed effects and Power ...
45 views

### Conditional intraclass correlation (ICC) from a linear mixed model as evidence for test-retest reliability?

In my experiment with two conditions (between-subjects design), participants completed a single-item scale three times: (1) before the experimental manipulation, (2) after the experimental ...
19 views

### How to interpret differences in explained variance (both r2m and r2c) among models that are not nested?

I want to evaluate how well a device (dev.B) can predict accurately the values of another device (dev.A) that is used as a ...
15 views

### coefTest for Mixed Logistic in Matlab [closed]

I conducted a mixed logistic regression model in Matlab with fitglme and want to conduct post-hoc tests on specific data points of a continuous*categorical interaction. I have tried doing this using ...
19 views

### How to fit the correct multilevel (logistic) regression?

I want to study the link between hospital competition and mortality. The competition a hospital faces is measured by the Herfindalh-Hirschman index (HHI). So I want to know if a hospital's HHI is ...
106 views

### Why is the coverage of this lme4 confidence interval less than 95%?

I have data that can be described using the model $y_{i j} = \alpha_i + \epsilon_{i j}$, where $\alpha_i \sim \text{N}(\mu_{\alpha}, \sigma_{\alpha}^2)$ and \$\epsilon_{i j} \sim \text{N}(0, \sigma_{\...
11 views

### OLS or GLS for balanced random coefficient model [closed]

For the balanced random coefficient model, The beta_hat is the GLS for beta, would you please help me to figure out that why it is Y_bar, where does y_bar come from. Thanks!
27 views

### Mixed Effects Nesting

I have a simple model with mixed effects. I asked subjects ten questions, five easy and five hard, and saw how much they relied on advice, based on who their advisor was (algorithm or peer) and how ...
38 views

### Relevance of Mixed Model Estimates vs. Observed Means [duplicate]

This question is a follow-up to a previous question I asked regarding mixed model effects construction, linked here. It provides some background, although this is a broader question with little to do ...
34 views

### Power calculations for a mixed model using simr

I'm trying to conduct a power calculation for a mixed effect model I built using lmer. I already have some pilot data, so I have an idea of the estimated effect size, but what I'd like to know is what ...
22 views

### 'Translate' ANOVA comparison on regression parameters into linear mixed model

I am analysing data from a medication study. Participants did the same task twice; in one session they were given a certain drug and a placebo in the other one. The order of the sessions was perfectly ...
13 views

### Comparing variables against a baseline in R random effect mixed models

I am trying to analyse the effect of age and town on F2 value of speakers. Firstly apologies if this question is really basic, I missed pretty much all of my R tutorials due to the pandemic and having ...
39 views

### three way interaction in lmer

I have two continuous variables (cfreq, and LanPro), and one catergorical variable (cond_aud, as shown in the picture). The summary of a lmer model shows a three way interaction of aud (EA and NoA) x ...
66 views

### Two levels of a factor in a linear mixed model; one is fixed and another is random. Is that possible?

Can you specify one level of a factor as fixed and the other as random in a linear mixed model (with lmer)? Some background information first: A set of speakers who vary in their proficiency levels (...
23 views

### Redundant Parameters in Cross-Level Interaction: Mixed Modeling

I'm using SPSS to run a Mixed Model with two categorical (factor) predictors with an interaction between the two predictors. I get the following Estimates of Fixed Effects: In the interaction I am ...
25 views

### experimental design - repeated measures within factor combinations?

Sorry for what might be an obvious question, but I have a question about an experimental design for which I can create a "mouse" analogue: I have 270 mice. I have 2 treatments (factors)-- L ...
18 views

### Additional steps for smoothing log transformation to establish RMSE? [closed]

A GMLE is too complex for the data, so I use a LME and have a log(DV + 1) ~ IV. If I want to calculate the RMSE, would it be principled to subtract 1 from all modeled values, then exponentiate these, ...