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

How to study a fractional factorial design? [closed]

I wonder why a DoE/fractional factorial design isn't studied with the help of a linear mixed model? Or an Anova? How to analyze it in general is e.g. given here. Background: I will study several gas ...
34 views

Mixed-effects model in lme4 with partial correlation of treatment and cluster

I have data from a randomized experiment, which is clustered at two different levels in the following form: So the situation is a bit unbalanced: There are N = 14 clusters of level 1, which all ...
19 views

Random effects estimates using heuristic / numeric approaches

This is perhaps more a conceptual question. I'm using an heuristic algorithm (ABC: Artificial Bee Colony) to search solutions for a given model that can take additional factors such as numerical and ...
38 views

d-prime as dependent variable in mixed effects model

d-prime refers to the sensitivity index in the signal detection theory, calculated as the z(probability of hit)-z(probability of false alarm). If I have to build a linear mixed-effects model with d-...
20 views

Is It Valid To Calculate Model-Averaged Confidence Intervals In the Same Way As Model Averaged Predictions?

I'm fitting a series of mixed-effects models, and I'm trying to calculate the model-averaged predictions and their confidence intervals. If I have a set of $R$ models $\{M_1,...,M_R\}$ I know that ...
24 views

How to encode Times within Days in Multi-level Mixed Model in R?

I have the following experiment: I tested 16 subjects on 4 different days with a (repeated) measurement every 20 minutes for a total of approximately 15 measurements/day. I have about 4 time varying-...
25 views

Why are my confidence intervals much larger in glmmADMB than glmer.nb?

I'm plotting 3-way interaction terms from a negative binomial models, and tested the models in two packages to check my work and as a sensitivity analysis. I used the effect function to extract the ...
39 views

How to interpret a GLMM

I am new to stats and have run a GLMM in R using the lme4 package. The model includes marine litter collected in KG, with fixed variables of population (all), wind direction, wave strength. Random ...
62 views

Regression Modelling of Linear, Exponential, and Power Curves in R [closed]

Please note this is cross-posted: https://stackoverflow.com/questions/57982488/regression-modelling-of-linear-exponential-and-power-curves-in-r I am trying to model reaction time (and other) data ...
8 views

Simulate Data for Power of Random Intercepts Model

I am interested in calculating the power of a cluster randomized clinical trial of a binary intervention ($T$=1 for treated and $T$=0 for control). I have a pretty set number of candidate clusters ...
44 views

jointModelBayes output

Consider the following example from a workshop by Dimitris Rizopoulos workshop. We have the following joint model: \begin{equation} \begin{aligned} y_i(t) &= m_i(t) + \epsilon_i(t) \\ &= \...
30 views

How to calculate individual covariances and residual covariances in a multivariate mixed model

I need enlightenment in calculating individual covariances and residual covariances in a multivariate mixed model. I'm going to use the dataset 'Owls', present in the glmmTMB package to replicate ...
36 views

Can we model a bimodal response variable using a mixed effect model?

I have a response variable that is bimodal (basically, 2 normal distributions that are sticked together) and want to model it using a linear mixed effect model. Here is a quick example (in R): <...
58 views

linear mixed effects models - overfit: how to calculate predictive 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: ...
106 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 ...
50 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-...
35 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 ...
32 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 ...
36 views

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

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 ...
38 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 ...
26 views

bootstrapping mixed effect regression coefficients in statsmodels

I have a mixed effect model that looks like this: ...
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 ...
58 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 ...
54 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 ...
39 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 ...
45 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 ...
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... ...
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 ...
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 ...
42 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 ...
70 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 ...
38 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 ...
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 ...
51 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 ...
66 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 ...
56 views

Residual diagnostic plot of mixed model

I am fitting a mixed-effects model with the following specification: ...