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.

0
votes
0answers
4 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 ...
0
votes
0answers
8 views

'aqmm' - sample R code & output interpretation? [on hold]

Does anyone have sample R codes and outputs for 'aqmm' (additive quantile mixed model)? This would help me visualize how to set up my model and interpret outputs. I'm trying to build an additive ...
0
votes
0answers
19 views

Inverse of covariance matrix in Linear Mixed Models

I have to find the inverse of covariance matrix in Linear Mixed Models. My model is a balanced case and it can be written as follow: $$ Y = X\beta+Z\alpha+\epsilon $$ With $$ \alpha \sim N(0, \...
1
vote
1answer
22 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 ...
0
votes
0answers
6 views

Accounting for peer feedback (nested multilevel)

I was trying to figure this our for a week now, but I am still confused. Perhaps someone can help me here. I have self-reported personality indicators per individual (IVs) and then perceived behavior ...
1
vote
2answers
56 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
43 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). <...
0
votes
0answers
11 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
13 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
10 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
28 views

Repeated Measures in Mixed Model - Creating Graphics [on hold]

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
30 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 ...
3
votes
1answer
52 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
14 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 ...
0
votes
1answer
44 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
34 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
34 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
17 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
39 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
27 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
35 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
68 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
28 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
76 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
11 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 %...
1
vote
0answers
36 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
24 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
11 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
41 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
95 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
21 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
26 views

Linear mixed effects model for trial [R]

I have finished a trial where we measured continously measurements like blood pressure ...
1
vote
0answers
12 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
46 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
22 views
0
votes
0answers
15 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
31 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
23 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
28 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
31 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
22 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
24 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
33 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
36 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
32 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 ...
0
votes
1answer
35 views

Reporting confidence interval of linear mixed model in R

Hi I have a question regarding interpreting the confidence interval of linear mixed model in R So I have a model like this ...
4
votes
1answer
28 views

How to deal with subset of variables that are invariant for subsets of sample

I am thinking about a problem in which I have a sample which consists of subsamples with the same values for a subsample of independent variables. I want to apply a simple linear regression with ...
4
votes
2answers
166 views

Using indistinguishable subjects as predictors/random effects

I would like to model data where the outcomes are produced, jointly, by a pair of indistinguishable subjects. As an example[*], consider the length of two-participant conversations. These data have ...
0
votes
0answers
18 views

Which effect size to determine sample size in power analysis for mixed effects model?

Experimental design: 3x12 repeated measures. I ran a mixed effects model that revealed an effect of "variable x" for which there are 12 levels. Post-hoc analyses based on this model (paired samples ...