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
0answers
22 views

adjusted R-squared

Does anyone know how to calculate the adjusted R-squared for mixed effects models in R? Also, when two models give you a very similar adjusted R-squared, what criteria do you normally use for model ...
1
vote
0answers
21 views

linear mixed effects models - overfit: how to calculate predicted R squared

I am using R to build the random structure of my model but I am ending up with a very complex model. Currently looks like this: ...
2
votes
2answers
84 views

Why are emmeans package means different than regular means?

I am analyzing a dataset with missing data using the lme4 package for fitting mixed models and calculating fitted means from it using package emmeans. I have a feeling it relates to the missing data ...
1
vote
2answers
44 views

How reliable is a linear model on log-transformed data

I have collected timing data in which the residuals are non-normally distributed. I log-transformed the data, and then conducted a linear mixed-model regression analysis. (The residuals from the log-...
0
votes
0answers
23 views

Comparing effect of treatment, measured across several time points

I have an experiment in which mice were treated with a drug (or mock treatment) and an enzymatic activity assay was then conducted at four time points, one before the treatment and 3 after the ...
2
votes
1answer
29 views

Is there a better way to compare Intraclass correlations using mixed models?

The situation is this: The lab I work for is building an intercept-only mixed model, in part to estimate the intraclass correlation related to a particular random effect. They want to build two of ...
2
votes
0answers
30 views

GAM model: Group-specific smoothers with different wiggliness of two random and nested factors

I aim to model the specific seasonal population fluctuations of several species. In particular, I have the abundance of individual along several years of 20 populations belonging to 5 species, and I ...
1
vote
2answers
32 views

Analysis of interaction with multiple levels in each factor (emmeans in mixed model)

I ran an experiment with treatment (3 levels: ctrl, A, B) as a between-subject factor and environment (4 levels: 1, 2, 3, 4) as ...
0
votes
1answer
17 views

bootstrapping mixed effect regression coefficients in statsmodels

I have a mixed effect model that looks like this: ...
1
vote
1answer
24 views

Help for possible nested mixed effect model

I'm super new to mixed effect models and I wanted to make sure I was interpreting R code correctly. I'm using the "lmer" function in the "lme4" R package to do my analyses. I'm interested in ...
0
votes
2answers
53 views

generalized linear model with log link using log transformed fixed/random effects?

I am modelling a longitudinal dataset consisting of a continuous response variable (mutation count) with a binary predictor (medical history, ie previous medications) while accounting for time and ...
0
votes
1answer
35 views

Time varying covariates in longitudinal mixed effect models

I am looking for some help with my analysis of longitudinal data with time-varying covariates. I am planning to use R and the lme4 package. However, I am happy to use Stata also. I am interested in ...
1
vote
1answer
33 views

post hoc pairwise comparison

I have a model testing whether the modifications to my texts (fixed factor: Modified) affect several measures (for example IA_FIXATION_COUNT). The Texts used in my experiments are 8, and when i want ...
0
votes
1answer
40 views

Mixed models in repeated measurement with one treatment

I have an experiment that includes 8 subjects during one treatment, measuring response variable. The hypothesis is that there is some correlation between AV and lactate during the treatment. Some ...
0
votes
0answers
28 views

Can a nested random effect be examined as interaction?

I have a dataset in R containing some experimental behavioral data with the following structure. SubjectID: 1, 2, 3, 4, 5... ...
1
vote
1answer
16 views

Using General Mixed Effects models to address pseudo replication

A common problem in animal studies is pseudoreplication of data points due to a limit in the number of animals available in a study population. I need to address any pseudoreplication and influence ...
1
vote
0answers
27 views

How do you evaluate the prediction accuracy of linear mixed models?

How does one evaluate prediction accuracy with uncertainty for linear mixed models? Let's say I do bootstrapping and do train/test each time, and want to generate confidence intervals for some ...
0
votes
1answer
41 views

Is different sample size okey for a Repeated measure-between Subject experiment?

I have data from a between-subject experiment (Repeated measures, two conditions). Condition A has 15 participants while condition B is with 19. The difference is due to missing data. My aim is to ...
2
votes
1answer
69 views

What exactly is meant by a singular fit of a mixed model, and why does it result in perfect correlations among random effects?

I understand a singular fit to be cases where a random effect has a variance of 0. Does this essentially mean that the model could not find a variance parameter for the random effect that did better ...
0
votes
2answers
36 views

Model specification in nlme: Random effects

My design has a total of 20 sites. 5 sites belong to each of four land covers: A, B, C and D. In each site, I have 5 sampling locations, 2 metres from each other. From each sampling location, I ...
1
vote
0answers
25 views

Correlations in nested dataset [closed]

My main objective is to perform a correlation between a fitness cost (ex: lag phase duration) and amount of resistance. I do, however, have a quite complicated data set. I performed evolution ...
0
votes
1answer
50 views

Modelling proportion data using GLMMs

I am having some trouble finding the correct way to analyse some data. I am trying to determine whether a certain treatment had an effect on frog calling. Frog calling was measured as presence or ...
3
votes
2answers
62 views

Why is $R^2$ so difficult to calculate for mixed models (both for the model as a whole and the fixed effects)? [duplicate]

I have been using a package to calculate $R^2$ values for mixed models. The documentation for the package has the following quote from Harry Singmann: "The fact that calculating a global measure of ...
1
vote
1answer
55 views

Residual diagnostic plot of mixed model

I am fitting a mixed-effects model with the following specification: ...
1
vote
1answer
41 views

Mixed effects model with between subjects dependent variable

I've got a dataset where I try to predict a between-subject dependent variable (continuous), the average number of times a participant made a mistake on a cognitive task, with a within-subject ...
0
votes
0answers
16 views

Derivation for mixed distribution, Poisson-Lindley

I want to derive the Poisson Lindley Distribution. $$ f_x(x|\lambda) = \frac{\lambda^{x-1}}{(x-1)!}e^{-\lambda}$$ $$f_x(x|p) = \frac{p^2}{(p+1)}(\lambda+1)e^{-\lambda p}$$ The Distribution of x, $...
5
votes
3answers
364 views

Random effects model handling redundancies

I am trying to deal with a time-to-event analysis using repeated binary outcomes. Suppose that time-to-event is measured in days but for the moment we discretize time to weeks. I want to approximate ...
0
votes
0answers
21 views

Cluster Bootstrap Mixed Model Contrasts

So I regularly make use of lme4 and lmerTest to fit Linear Mixed Models. I then do the post ANOVA contrasts via the emmeans (Estimated Marginal Means) package. However, I understand that for ...
0
votes
0answers
11 views

Random slope perfectly correlated with intercept even when I group-mean center the intercept?

On my original dataset, I ran a multilevel regression with an intercept and a variable. I found that the random slopes were perfectly correlated with the random intercepts. I figured I could get ...
1
vote
1answer
59 views

What does Deviance mean in lmer [duplicate]

Probably a rather silly question, but I would like to have a clear explanation of what deviance in linear mixed models (using lmer) is. For instance, how do I interpret it along AIC, BIC, and LOgLik ...
2
votes
0answers
20 views

Why are my DF for denominator so large? Reporting mixed model output

I've never used linear mixed effects models before, so I'm new to reporting the results. Following a paper that used the exact same procedures as mine (pre and post test of this specific task), I'm ...
3
votes
2answers
72 views

Explaining Fixed and Random Effects

Let's say that I am trying to predict the Sepal Length in Iris data from Sepal Width, ...
1
vote
0answers
12 views

Interpreting nested mixed effects modelling output [closed]

I am having difficulties in interpreting my R output for a multilevel model I have conducted using the NLME package. I'm looking to answer the following questions: 1) What are the predictors of ...
1
vote
0answers
37 views

Interpreting nested mixed effects modelling output

I am having difficulties in interpreting my R output for a multilevel model I have conducted using the NLME package. I'm looking to answer the following questions: 1) What are the predictors of ...
0
votes
0answers
18 views

Mixed model development structure

My boss believes the data that we are working with might be understood via a mixed model. I wanted to make sure I was designing the model correctly as well as having a couple of questions. We have ...
0
votes
0answers
8 views

Numeric variable as a nested fixed effect nested within the fixed effect of a 2-level factor variable in a Poisson GLMER?

Can a numeric variable be nested as a fixed effect within the fixed effect of a 2-level factor? In either case, I would really appreciate published sources that support any claims. I have a set of ...
0
votes
1answer
36 views

How to correctly use lmer for mixed-effects model?

I have data of an experiment where subjects (ID) have to perform 10 trials of a go/no-go task. I want to study the influence of ...
2
votes
1answer
52 views

random intercept, random slope, what's next?

Consider a mixed effects model with a random intercept. This means $$y_{ij} = b_{0i} + \dots \text{ fixed effects } \dots +e_{ij}.$$ Now, suppose that we group the observations with respect to time $...
0
votes
0answers
31 views

Which is the best method to analyse binary data in mixed models?

I wonder if there are suggestions about which method do use to analyse this type of data. My idea is to use glmer, or is there a better option? ...
0
votes
0answers
11 views

Linear mixed model in R for repeated measures with non-randomized groups that have baseline differences

I have a question about how to analyze the results of a study I conducted. The study occurred on a remote island with a very small, unique population and in children. In order to be minimally invasive,...
1
vote
0answers
8 views

When an analysis with random effects returns random effects with a perfect correlation, does this mean that it can only estimate one of them?

I have read the recommendation to perform dimension reduction on a random effects structure. I'm trying to get my head around exactly what this means. I assume it has to do with the fact that often a ...
3
votes
2answers
53 views

LMM: Non-independence of observations sharing a single fixed-effect value

I am interested in the effect of monkey's stress levels on the pitch of their calls. Each stress measurement is associated with a bout of calling (that is, multiple calls), and in some cases I have ...
1
vote
0answers
12 views

Reporting RESULTS of least square means as post-hoc test for linear mixed model- Best practice

Anybody have good example of how to report the results of a least square means result of a Linear mixed model?- I welcome any guidance on good practices to report this kind of result. I posted below ...
2
votes
1answer
34 views

How to run mixed effects models with lots of 0's

I have ecological data (transects as the unit) from inside marine reserves and matched control transects that I would like to test the difference across 18 separate response variables. These are 3 ...
0
votes
1answer
20 views

Incorporate continuous group level variable in a hierarchical model?

I aim to assess the effects of difficulty (continuous variable) and trial type (0/1) on whether a subject has been correct in a logistic regression model. However, I have also measured subjects ...
4
votes
0answers
87 views

Is this a random or a fixed effect?

I have a question about one of the variables in my study and whether or not it should be considered a random effect. I'm conducting a study of my school's 24 general learning outcomes (or "skills".) ...
0
votes
0answers
14 views

Figuring out GLMM family for S-shaped curve, or going non parametric?

I have two processes that output n-square matrices. I am interest in modelling these matrix norms as a dependent variable, according to the process used, and the matrix size n as predictors. I ...
1
vote
1answer
27 views

How can I adress problems of heteroscedasticity in mixed model analysis?

I am analizing pupil size data using mixed model analysis in R. I use lme() from package nlme. However, I am encountering serious problems of heteroscedasticity and ...
0
votes
0answers
13 views

Path Model with (endogenous) Treatment - which model?

I have collected data on the intention to create a new business of my students. I measured it before the course (t1) and after it (t2). I have data on their absenteeism in class and the time they ...
2
votes
0answers
23 views

Random effects for mutually inclusive grouping factors

I am trying to fit a model on a set of data (e.g. 10,000 observations with 20 explanatory variables). The observations belong to 30 groups, G1, G2, G3, ... G30, so I need to account for the grouping ...