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,502 questions
Filter by
Sorted by
Tagged with
127 views

Adding a magnitude penalty to a GAM

This is a follow-up to a previous question of mine, explaining the problem in more detail in the hopes of getting more precise advice. Consider the following structured additive regression model or ...
4k views

What is the mathematical difference between random- and fixed-effects?

I have found a lot on the internet regarding the interpretation of random- and fixed-effects. However I could not get a source pinning down the following: What is the mathematical difference between ...
688 views

Intraclass correlation standard error

I am in the last stage of my paper review and it is very close to getting submitted. However, there is a comment I am highly struggling with: The reviewer wants to know what the ICC and the s.e. of ...
42 views
+100

Model design with repeated equivalent measurements

I have a population of n individuals. For each of them, I have measured an outcome once: $Outcome_{ i} \,\,\,\ i=1..n$ I have also some measurements: for each ...
29 views

LMER model with uneven time points

Does it matter that my time series are taken at random points? All the examples I've seen have nice time series, like every day or whatever. I have what is otherwise a pretty simple model: one fixed ...
39 views

How to analyze experiment (based on DoE and via mixed model)?

I am about to deploy my DoE which is based on six parameters with two whole plots: Temperature and relative humidity. The experiment aims at studying a sensor due to the presence of several gases (...
44k views

How can I test whether a random effect is significant?

I am trying to understand when to use a random effect and when it is unnecessary. Ive been told a rule of thumb is if you have 4 or more groups/individuals which I do (15 individual moose). Some of ...
21 views

Baseline adjustment in mixed models with two assessments

I want to exmine whether three interventions have different effects over time on an outcome that has been measured only two times (two assessments before and after treatment: baseline and follow-up) ...
17 views

Distribution of a quadratic form [on hold]

Problem: Let $x \sim N_{k}(\mu, \sigma^2 I)$. Show that $x^\prime x/\sigma ^2 \sim \chi^2(k, \mu ^\prime \mu/2\sigma ^2)$ I am trying to use the following theorem result but I am kinda confused how ...
2k views

Baseline adjustment in mixed models

I am doing mixed model analysis to evaluate (Y=) fruit intake (continuous variable) between two groups (intervention versus control) over time (baseline, year 1, year 2, year 5, year 7 and year 15). ...
17 views

Mixed models basic

I am learning mixed models and while reading different materials I still have a couple of questions that I could not find answers. If I have 2 or more fixed effects and if the interaction is not ...
7 views

“Nested” time-series comparison?

I'm Stick with a methodological problem and I'm not sure how to manage a possible solution. I want to compare two sets of observations made in two independent groups (15 subjects per group) over time. ...
119 views

Bootstrapping with more than one random effect

Consider an experiment with $m$ subjects and $n$ words. Every subject rates every word, producing an $(m \times n)$ data matrix $\hat{X}$. I am interested in forming a confidence interval around \$f(\...
14 views

phylogenetic multilevel model in MCMCglmm

I'm trying to run a mixed phylogenetic model using the MCMCglmm function in the R package of the same name. In this model, I want to estimate slopes and intercepts ...
25 views

Random effects in GLMM [closed]

I am running at the moment a GLMM with insect abundance (count data) as response variable and 3 landscape variables and temperature as (continous) explanatory variables. So, my GLMM looks like this: ...
16 views

How to analyze data with unequal length of observations and many zeros?

I want to analyze the impact of the rain on smoking probability. I observed people in two cities on the streets and marked the following parameters: city, gender of the person, duration of observing ...
23 views

Interpreting VarCorr estimates versus cor(ranef()) in lme4 mixed models

I am following-up this and this thread because I found it very difficult to understand the implications of using each of the two types of random-effect correlations. In particular, I fitted model like ...
28 views

How to measure carryover effect in a crossover design 3x3?

I'm trying to analyse a potential carryover effect from a study with a crossover design 3x3, three treatments and three periods. My data has a latin square design with the treatment sequences CBA, ...
24 views

Generalised Logistic Regression with mixed effects - Binomial model creation / selection

I have a dataset with 72 individuals from 5 separate groups, with repeated measures - each individual was sampled 4 times. All data is binomial, and in most cases there are more 0s than 1s. I have a ...
30 views

can I reshape my data to long format to run this model? [on hold]

Let's say I want to test whether age predicts performance in a math and biology tests. Let's ...
14 views

Interpretation of related lower-order interaction when higher-order interaction is significant

How do you investigate lower-order interactions which include one factor that is part of a significant higher-order interaction? Let's assume a research design with 4 factors (A, B, C, D), each with ...
20 views

Should modeled means in glmm be averaged on link or response scale?

I'm using emmeans to estimate means of 4 treatment levels. The response is a count with poisson distribution. The design is randomized complete block with 14 blocks, each with single replicate of all ...
400 views

Linear mixed model interaction not significant but post-hoc tests significant

Suppose I have a linear mixed model with three binary factors A, B, C. The main effects are all significant but only the interaction A*B is significant, none of the interactions including C is ...
39 views

Specifying mixed model in lmer for a single group reversal design

I have data on a simple experiment performed by one of my students looking at the effect of a single bout of aerobic exercise on working memory. The data are structured as follows: ...
19 views

Pairwise comparisons via emmeans

I have a question about emmeans and mixed effect model. I fit a complex model using lmer() with the following variables: A: a binary categorical predictor, between-subject B: a binary categorical ...
13 views

plot data after lme model accounts for covariates in fixed and random effects [closed]

I have a question regarding how I can grab residuals from a linear mixed effect model (e.g., using lme from nlme in R) in order to plot data after the lme model has removed specific variables of no ...
37 views

How to define a between variable is random effect in Anova in R? [closed]

I am using 'Anova' function in 'car' package to analyze plot - split experimental data. I have 1 between group, and 2 within group variables, so it is SPFp.qr analysis. The problem is, the between ...
27 views

Obtaining p-values in a robustlmm mixed model via Satterthwaite-approximated DFs of the equivalent lme4 model?

I've used lme4 to fit a mixed model and could obtain p-values by using the lmerTest or afex packages. However due to heteroskedasticity (Levene Test) I also fit a robust model (rlmer command in the ...
840 views

Interpretation of interaction and main effect in a mixed model when one is significant and the other is not [duplicate]

I have repeated (x4) measurements on 90 subjects. The outcome is zero inflated. The model output gives these estimates: ...
59 views

Size of cluster as a predictor in a glmm

I have pupils clustered within schools, with a binary outcome (pupil experiences bullying or does not). So far all predictors are pupil-level data, and I run a the same model (same predictors) on each ...
182 views

GLMM - age and time correlated

I've been trying to fit a mixed model in R however since age and time are correlated (both increase) I'm having some problems figuring out the best option. I have data on 500 children, between 2005 ...
12 views

Repeated measures linear regression / ANCOVA in R? [closed]

Apologies if something similar has been asked before, but I have a repeated measures design that I am trying to figure out the best way to model in R. The data (which would be in long format) would ...
481 views

Accounting for both within subjects and between subjects mixed model

I have an experiment where I have several subjects that I am analyzing a response for (call this RESPONSE). I am interested in the overall effect of temperature on RESPONSE. RESPONSE is measured once ...
150 views

Paired + unpaired repeated measures in same test

hope you can help me with this. I have the same survey that has been repeated each half year for almost 3 years (6 repeated surveys) with approximately 500 responses each time. Some of the respondents ...
457 views

Interpretation of Fixed Interaction Effects in a Linear Mixed Model

I have a linear mixed model for predicting speed of a street crossing by a pedestrian with the factors VS (vehicle speed), GAP (selected time gap size for crossing), the interaction factors VSxGAP and ...
7 views

How to use mixed ANOVA with 2 between-subjects and 1 within-subjects design

I know mixed ANOVA should be used when testing a data set containing within-between subjects design. As my data structure shows below, my between-subjects factor is ...
23 views

Need help: nested fixed effects in nlme()

I have two fixed effects in a nonlinear mixed effect model. One is nested in the other, as the case here: "Specie" is nested in 'category'. ...
121 views

Identifying when fixed effects have changed in a GLMM

I have a dataset spanning several years, that I have analysed year by year (using the same glmm model code) to determine whether the random effect (random intercept) has altered over time. I have ...
389 views

Confidence interval for proportions

I have some data like this: id pop var 1 593 51 2 592 31 3 346 20 4 1214 70 5 1063 66 6 1370 71 each ...
13 views

Understanding how to weight variables

I am trying to model the "recruitment" of a deer population where recruitment is a factor of "females counted in fall" and "fawns counted in fall". e.g femaleFall:fawnsFall = Recruitment. In some ...
14 views

Between Group comparison for parameters measured on different time points

I have a dataset of 100 patients for whom data was recorded of 3 different parameters say Heart rate, temperature and ETCO2 levels which are measured in 3 phases eg. Phase 0, Phase 1 and Phase 2. The ...
42 views

Mean Comparison test for 3 related samples

I have ratio scale data for 3 related samples. What is the statistical test that I can use to check whether there's any significant difference between the 3 groups? (I tried Friedman, but I'm doubtful ...
50 views

conditional independence mixed linear models

I'm analyzing an experiment using linear mixed models but am not sure whether my model is appropriate or whether I'm violating the assumption of conditional independence. I've asked a statistician at ...
23 views

How to incorporate splines of random effects in lme4?

Are splines of random effects allowed in nlme but not in lme4? How to incorporate splines of random effects in lme4? ...
27 views

Failing to understand and model market mix modelling

Hello I am have been trying to get my head around marketing mix modeling for last couple of months and have not been able to exactly figure out the nuances of the modelling. I have three years of ...
19 views

Shall I use type III Anova() in “car” package or anova() to compare models?

In one analysis, I want to use the mixed-effects model to test the fixed effect of Condition. To find out the effect, I've seen some people use anova() to compare the model to a baseline model without ...
17 views

How to analyze this unusal longitudinal design?

I have data coming from an unusual design. 10 subjects were drawn to receive an experimental eye drop for reducing intraoccular pressure. One eye was chosen by random and the drops were applied. The ...
54 views

How to deal with treatment effect at state level but observations at school level?

I have a panel of schools and I want to estimate the effect of a state level policy on school level outcomes (all schools in a treated state are treated). I can't use a fixed effects model since the ...