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
1
vote
1answer
54 views

Linear Mixed Effects Model in R [closed]

I am trying to understand the outputs from the lme() function in R. I have the following model: \begin{equation} X_i(t_{ij}) = \eta + Z_i(t_{ij})w_i + \epsilon_{ij}, \end{equation} where $\eta$ is ...
0
votes
1answer
73 views

Am I using the right linear mixed model design for my data?

I want to move from using repeat measure ANOVAs to linear mixed models (LMM). However, where I have good intuitions about ANOVAs, LMMs are new to me. I'm using python's StatsModels as my package. Here'...
2
votes
2answers
36 views

Are there two gamma vectors in multilevel models with more than one random effect?

For a multilevel model with random intercepts with $n$ subjects and $p$ fixed parameters the usual formula is $$Y = X\beta + Z\gamma + \epsilon $$ with the following dimensions: $Y - n\times 1 \\ X ...
1
vote
2answers
76 views

Mixed models: predict random intercept with partial data

I have a dataset with growth data for teens between 12 and 18 years old, where I want to predict throwing speed for all ages using a couple of other predictors. These predictors have been collected in ...
2
votes
2answers
77 views

lme4::glmer : Get the covariance matrix of the fixed and random effect estimates

My problem may seem easy but I have found no satisfactory solution. I am stuck on this problem for a few days already. How to obtain the covariance matrix of the fixed AND random effects estimates ...
2
votes
1answer
181 views

Which model to choose - lmer vs. glmer

I am trying to model y, a continuous variable that only takes positive values with fixed and random effects. This is my first approach, using lmer(): ...
1
vote
0answers
49 views

Regressing on residuals of linear mixed model

So for a linear mixed model like this: $y=X\beta+Zu+e$ I can estimate the BLUP for $u$: $\hat{u}=GZ^TV^{-1}(y-X\hat{\beta})$ Where $G$ is the co-variance matrix of $u$ and $V=ZGZ^T+R$, where $R$ ...
2
votes
2answers
69 views

where to specify covariates in a linear mixed effect model

I am using lme4 to create a mixed model for my data. I am looking at the effect of land cover on soil properties at three depths, for example, carbon concentration. I have identified my fixed ...
1
vote
1answer
31 views

Is mixed effects sensible or even superior to fixed effects when DV is standardized?

I want to investigate how a certain measure, that is standardized between 0 and 1, differs between subjects and subgroups. I am afraid that a mixed effects model would be not superior to a fixed ...
1
vote
2answers
72 views

How should I account for repeated measures in a mixed effects model in R?

I'm new to linear mixed-effects models and I was wondering if I could get some help in getting my model to properly work. I have an example dataset: ...
1
vote
1answer
105 views

interactions involving two continuous predictors with emtrends

Let's say I have a model with two continuous predictors (nitrogen and temperature) and one categorical variable (variety). <...
1
vote
1answer
76 views

Can MAD (median absolute deviation) or MAE (mean absolute error) be used to calculate prediction intervals?

From my understanding, RMSE (root mean square error) estimated through cross-validation can be used to calculate the prediction interval of a mixed-effect linear model with gaussian error. In my case, ...
0
votes
0answers
15 views

Between grouping-factor variance-covariance matrix

I am working with lmer in R and am unsure on the assumptions on the variance-covariance matrix for the random effects in a mixed effects model. If I have a 2 ...
1
vote
1answer
40 views

a covariate versus a random effect [duplicate]

I have looked around on cross validated as well as other places but can't seem to find an answer. I'm running a generalized linear mixed-effects model. Y~initial abundance + Treatment + (1|Month) ...
1
vote
0answers
32 views

Repeated Measures in Mixed Model - Creating Graphics [closed]

In learning about mixed modeling and how to perform this in SAS I came across this article https://stats.idre.ucla.edu/sas/seminars/sas-repeatedmeasures/ However, I am not able to wrap my head ...
1
vote
1answer
37 views

Variable selection for mixed models

Longtime lurker here. I have a question about determining informative variables in generalized linear mixed models (GLMMs). My background is ecology, and I primarily examine habitat selection under ...
4
votes
1answer
75 views

Should I use a linear mixed model or a generalized mixed model?

I have a test dataset with repeated measures, different individuals sampled at different time points, here measured in days. I want to know if I should use a GLMM or a LMM to see how well, if at all, ...
1
vote
0answers
17 views

Is it a problem if cluster sizes vary wildly in a cluster-randomized experiment?

Consider a cluster-randomized experiment. There are 4,000 clusters and 2,000,000 observations. The dependent variable y is dichotomous, $Y \in \{0, 1\}$, and ...
1
vote
1answer
143 views

Model selection: Two-Part Mixed Effects Model for Semi-Continuous Data

I have now been studying mixed models for about a month, I am still a pure beginner. I have zero inflated semi continuous dependent variable (yield of trees between two periods). Exploring ...
1
vote
1answer
38 views

How do I interpret the random effect in my mixed-effects model?

I have run a linear mixed effects model with individual as a random effect. I have three separate measurements of each individual. The random effect is significant, ...
1
vote
0answers
43 views

A nonparametric residual bootstrap for random-effects models

This question regards ideas from "A novel bootstrap procedure for assessing the relationship between class size and achievement". The authors first describe a parametric bootstrap for random-effects ...
0
votes
0answers
18 views

Conceptually, what makes a convincing case for researchers to add an extra predictor to their models?

Here is a thought-example to make things easily understandable: Let's pretend that researchers often use a paradigm where half of a series of objects are shown to participants' left eye and the other ...
0
votes
1answer
40 views

Is a random intercept a generalized linear model?

As explained in these introduction to random intercepts models lesson, for a simple random intercepts model, the model definition is the following: $$y_{ij} = b_0+b_1x_{ij}+u_j+e_{ij}$$ Where $y_{ij}$ ...
1
vote
0answers
122 views

Effect size for mixed ANOVA

I have a mixed anova with repeated measures design: two between-subjects factors, doctor (3 levels) and method (3 levels), and one within-subject factor, time (1w, 3w, 2m, and 6m). 3 doctors would be ...
0
votes
0answers
57 views

logistic regression with two continuous predictors

Let's say I conducted an experiment in which I measured if customers bought a particular product and also measured customer satisfaction with the shop and familiarity with that product. The dependent ...
1
vote
1answer
73 views

zeroed random effects after fitting a mixed effect model [closed]

I am fitting a linear mixed effect model with two categorical factors: mPair with 6 levels, and spd_des with 3 levels. This is a ...
2
votes
1answer
42 views

Is it correct to treat a confounding variable as random with mixed modelling?

In a semi-controlled experiment, seeds were sown in about 20 boxes, associated with 3 types of soil. A few months later, the morphological characteristics of the shoots were measured. We would like to ...
3
votes
1answer
112 views

Random effects in repeated-measures design using lme

I have a repeated-measures design where participants were measured 4 times each on 2 consecutive days. There were 2 conditions, randomly attributed to day 1 and day 2 for each participant. So, this ...
0
votes
1answer
49 views

How to address a detected nesting structure using emmeans

I'm analysing the results of a M BACI experiment. When trying to estimate means using emmeans, I'm getting this message: NOTE: A nesting structure was detected in the fitted model: BurnType %...
2
votes
0answers
64 views

diagonal var-cov matrix for random slope in lme4

I am fitting a mixed effect model with a random slope on a factor with 6 levels using the function lmer(). ...
0
votes
1answer
36 views

Repeated measure for multinomial logistic GLMMs in SPSS?

I am analyzing some linguistic data, where each subject has to rate the acceptability of a number of sentences on a scale of 1-7. I am running a Generalized Linear Mixed Model in SPSS, with a ...
0
votes
0answers
12 views

The orthogonal rotated data

Suppose the multivariate one-way anova model for the raw data , i.e. $$ \label{Example_model_1} \mathbf{y}_{ij}=\mathbf{\mu}+\mathbf{z}_i+\mathbf{e}_{ij}, ~~ i=1,\ldots,m,~~j=1,\ldots,n_i,~~~~~~~~~~...
1
vote
1answer
82 views

Lagged variables in multilevel models

Is it okay to use lagged dependent variables as predictors in multilevel models? i.e. If there are $j$ groups of $i$ individuals each measured $t$ times, to model $$ y_{ij} = \beta_{0j} + y^{-1}_{ij} ...
0
votes
1answer
271 views

Model is nearly unidentifiable: very large eigenvalue

I'm fitting a generalized linear mixed model using glmer() and I'm getting a warning that I don't understand: ...
0
votes
1answer
25 views

Is it proper to compare a full linear mixed effect model that converges and an refined model that does not?

I was trying to construct in Rstudio a full LME model and a refined one (full model minus one predictor) and using anova() to get the main effect of the dropped predictor. My full model converged (but ...
0
votes
0answers
11 views

How to set up Linear mixed model in SPSS? [duplicate]

I am trying to find out how inflammatory markers change in response to a mechanical device change. I have daily readings for the 5 days before the event and for the 5 days after the event. I am ...
1
vote
1answer
32 views

Linear mixed effects model for trial [R]

I have finished a trial where we measured continously measurements like blood pressure ...
1
vote
0answers
16 views

Comparing fixed intercepts of different mixed models R

Given 3 variables: y is continuous, x is continuous, z is a repeated measures factor, nested within subjects. I have two models from different data sets a and b: fitm1 <- lme(y ~ x + z, random = ~...
1
vote
0answers
59 views

How is it possible to control for observer bias in measurements with a random effect?

I have a dataset with repeated (but not always) measures of animals. I need to control for observer bias in measuring the morphology of my animal. I'm wondering what is the way to first estimate ...
2
votes
1answer
40 views
0
votes
0answers
19 views

Data transformation on grouped data

I am running an Ax(BxCxS) mixed design. During data screening, I assessed for normality by splitting my data based on the two levels of Factor A. Some variables for one level are nonnormal (and normal ...
2
votes
0answers
34 views

Stats questions for a laboratory experiment with a small number of animals

I've been asked to run the stats on an animal behaviour experiment performed in a laboratory setting and, coming from a field ecology background, I have some basic questions regarding how I should ...
0
votes
0answers
44 views

Model selection with AIC/BIC, which variables to remove?

I am running a Generalized Linear Mixed Model analysis in SPSS 25, and have gotten to the point where I would like to justify the selection of my final model based on information criteria. However, ...
0
votes
1answer
47 views

A non-linear regression model for within subject observations

I am trying to perform the equivalent of a repeated-measures ANOVA using data that have a non-linear relationship. There are two independent variables: Spacing between stimulus (10, 20, 35, 45, 60), ...
1
vote
1answer
38 views

Repeated measures in a mixed model

I'm trying to fit a mixed model for data from different medical centers, where "center" is thought of as random. I have data over 2 years on how many patients they receive each day. I have several ...
0
votes
0answers
23 views

Estimate Particle Density from Image Analysis

Suppose I have an old image of an object where the objective is to estimate the mean particle density of said object. Using a software called ImageJ, I am able to run a thresholding algorithm to ...
0
votes
1answer
27 views

In glmer, can I treat both like a random effect and a fixed effect the same factor?

I conducted a memory study and used glmer to find if there was an interaction between time and ...
1
vote
0answers
40 views

Repeated measures/pseudoreplication - Comparing all samples against all other samples

I am currently analysing some data, and I am not confident that I am going about it in as statistically sound way. We are trying to determine whether our treatments affect the distance between two ...
1
vote
1answer
43 views

My confidence intervals for a negative binomial mixed-effect model are not right?

I'm using glmms with a negative binomial distribution from the lme4 package. I've run my model (Checked for singularity) and have plotted the fitted values along with the 95% confidence intervals for ...
0
votes
1answer
37 views

Using lme4/ linear mixed model to model longitudinal data in which age at first test and duration between measurements vary

I need specify a model using lmer() with data (n > 3500) in which there is a lot of variability in the age of the (human) subjects and also the duration between measurements (5 measurements total but ...