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

R Code for ANOVA of data from plot sampling in RCBD

I set up a RCBD experiment in which I evaluated some maize varieties or treatments (V) in replicated blocks(R). I however also sampled (S) 5 plants from each varietal plot. I intend to write a code ...
Segun Ojumoola's user avatar
2 votes
1 answer
469 views

Modeling growth curves with different starting sizes (NLME in R)

I am trying to model fish egg growth over time given a starting egg size in R. I have repeated-measures data from individuals with grouping variable "Zafra.1". I do not know when the eggs started ...
Matt Foster's user avatar
1 vote
0 answers
82 views

How to calculate a sample size for a longitudinal study with repeated data?

Did you know a program or logiciel that allows to calculate the sample size for a longitudinal study with repeated data ? And if my subjects are nested in some schools, how I calculate the sample ...
Lemon3's user avatar
  • 41
1 vote
1 answer
55 views

Its my model a Mixed model?

I am running some analysis with mixed model with R. I get differents measures from differents persons (person as random effect), during this analysis and looking plots for each people vs measures I ...
Rodrigo's user avatar
  • 39
1 vote
1 answer
446 views

Are covariates in a mixed model estimated between-group, within-group, or somewhere in-between? And why?

Consider a linear (perhaps mixed) model where we have one factor $p$, one covariate $x$, and no interaction. I want to understand how the coefficient estimate $\hat\beta$ of $x$, and its standard ...
justme's user avatar
  • 775
1 vote
1 answer
133 views

How to find the best fixed effect in a mixed model?

I am trying to see the difference between two variables in mixed models. Background: The models are for an experiment with a randomized complete block design, but there is a bit of missing data. ...
andemexoax's user avatar
0 votes
0 answers
222 views

Summary Output for Nested Random Effect in Fixed Effect

I am trying to build a mixed model with random effect nested in fixed effect. Below is an example dataset. ...
user1757654's user avatar
1 vote
0 answers
66 views

Treating stimuli and participants as crossed or nested random effects in lme4?

I have conducted an experiment where I measured the pupil diameter of 100 participants in response to 9 sounds presented in a random order, all participants heard the same 9 sounds. I would like to ...
ks19's user avatar
  • 11
3 votes
1 answer
1k views

An R package for GLMM estimation with two random effects?

I am looking for an R package to make an estimate on a general linear model with two random effects. I was used to lme4 (function...
Flora Grappelli's user avatar
2 votes
1 answer
62 views

Is the significance of an interaction more important that the fit of a model?

I am new to lme4 and I am not sure if I understand correctly. If I want to know if there is an interaction between A and B, I have to write two models and then compare them with anova and the one with ...
Lili's user avatar
  • 87
11 votes
1 answer
713 views

Repeated measures anova: lm vs lmer

I'm trying to reproduce several interaction test between with both lm and lmer on repeated measures (2x2x2). The reason I want ...
mat's user avatar
  • 551
4 votes
0 answers
215 views

Syntax differences between aov and lmer for two-way repeated measures design

I'm working with the following data frame using R. It consists of measurements obtained from 7 subjects with two independent variables (IV1 and ...
user3050269's user avatar
10 votes
1 answer
190 views

Under what conditions does it make sense to fit random intercepts for an interaction, but not the main effects?

I am aware that when specifying the random structure for one factor (B) nested within another factor (A), we can use: ...
Robert Long's user avatar
  • 60.8k
1 vote
0 answers
40 views

Which model is correct?

I have experimental data frame. There are 4 experiments and 4 treatments within each experiment repeated 4 times within each experiment (balanced design). I would like to test the effect of experiment ...
Legionista's user avatar
3 votes
1 answer
240 views

Repeated measures: Use random intercepts model, too many intercepts?

This is a common question, but I couldn't find a question / answer on Cross Validated dealing with the same problem. In short, is 1000 intercepts too many intercepts, that is, can individual be a ...
Helgi Guðmundsson's user avatar
0 votes
1 answer
420 views

How to check the linearity of continuous variable in linear mixed model

I'm doing a linear mixed model using lme. In my adjustement factors, I have a continuous varaible (named X1). And I want to check the linearity of this variable using a spline function or a ...
Lemon3's user avatar
  • 41
3 votes
2 answers
424 views

How to combine random effect and nested random effect with lme

I'm doing a mixed linear model. And I have subjects who have been select in 20 schools. So I want to take this to account. For this, I want to put a random intercept for the "SCHOOL" variable and a ...
Lemon3's user avatar
  • 41
1 vote
0 answers
46 views

Repeated-measures anova and linear mixed effects models with nonrandomized data

I have data from 7 subjects (id) who performed 3 trials of each of 2 different kinds of movement (Factor mov) under 2 different ...
user3050269's user avatar
0 votes
1 answer
186 views

Control variable with different levels in Regression

I have an experiment with two conditions: Control and treatment groups. I am measuring how confident the treatment groups felt while answering the question. It is a three level indicator- not sure, ...
mashedpoteto's user avatar
4 votes
1 answer
1k views

Random effects in GAM

I'm modelling some biological function, outcome, in patients over 8 hours. Over time, I measure two additional covariates x and ...
Demetri Pananos's user avatar
2 votes
1 answer
3k views

Warning message when using a binomial distribution in glmer() models in R

I asked a similar question in the R forum but realized that isn't the optimal place to post. I'm working with a dataset looking like this: ...
juansalix's user avatar
  • 177
2 votes
1 answer
47 views

Minimum no. of grouping variables in mixed models

I have data where I collected y and predictors x1, x2, x3...
89_Simple's user avatar
  • 981
1 vote
1 answer
663 views

GEE vs GLMM in large sample size?

I am running two longitudinal models for two different populations I'd like to compare. N1=4,000 individuals (translated into about 20,000 rows; 18 variables) and N2=400,000 individuals (~4 million ...
Bella's user avatar
  • 11
3 votes
1 answer
2k views

Is it okay to fit linear mixed effects model in an unbalanced design as well as few observations (<2) at specific levels?

We are planning to collect behavioural data from ~200 children. We're manipulating 12 stimulus pairs. Based on 3 different models, for each stimulus pair there will be 3 different values to represent ...
CY Lin's user avatar
  • 31
0 votes
1 answer
332 views

Model assumption of linearity

I am trying to interpret the outcome of a test for assumption of linearity. This is the dataframe: ...
BAlpine's user avatar
0 votes
0 answers
66 views

forced fixed intercept but lattice plot showed random intercept

I was running a model and something weird pops up. I ran a multi-level regression using the code below: ...
Fan Xuan Chen's user avatar
0 votes
0 answers
1k views

Calculating R^2 for a linear mixed model in python

I have been looking around online in regards to R^2 calculations in mixed models and a lot of info has come up in R (lme4, MuMIn) where the lme4 package creates the mixed model fit and MuMIn ...
George's user avatar
  • 1
0 votes
1 answer
53 views

Should I treat these variables as random? (ecology/recruitment question)

I'm working with recruitment data for caribou. There are 13 different herds, sampled over 20+ years, once per year. Some herds are sampled consistently, some only a few times over 20 years. I'm ...
Jared Gonet's user avatar
3 votes
0 answers
39 views

Are there extant deep learning analogs to random coefficient (aka mixed) models?

Random coef models, applied to longitudinal data, capture response heterogeneity by cross-sectional unit. I've got a longitudinal prediction problem, in which I know that some "features" (or ...
generic_user's user avatar
  • 13.3k
4 votes
1 answer
134 views

Finding GLMMs that fit my count data for multiple datasets

I need some help finding a model that fits my data. I'm using GLMM's to test the effect of nitrogen level (numerical), species (two-level factor), and the interaction between these two variables, on ...
Niall Millar's user avatar
3 votes
1 answer
172 views

Out-of-sample predictions for mixed model are the same as naive model (ignoring the random effects)

I have a dataset that consists of subjects coming into the clinic (for treatment of another disease) and they are screened for Tuberclosis (as they are a high risk population). Every time they are ...
Dilsher Singh Dhillon's user avatar
2 votes
1 answer
184 views

Construction of linear mixed model (using R)

I would like to use Lineal Mixed model to see if the treatments I applied to some soil changed significantly their CO2 fluxes. I have 2 temperature (t1, t2) and 3 inundation (w0,w1,w2), resulting in ...
Novice_stat's user avatar
5 votes
3 answers
1k views

Mixed models. Random slopes only, mean and group centering?

Are random intercepts a theoretical/practical prerequisite to random slopes? Why? I have a three level (rep measures) mixed model where I wouldn't expect lvl 3 variation in initial status of outcome ...
Forevertrip's user avatar
2 votes
1 answer
1k views

Does nlmer() from lme4 assume normal distribution of residuals and random effects?

I am currently reading this paper , according to which Linear mixed-effects (LME) (Laird & H.Ware, 1982) and nonlinear mixed-effects (NLME) models (Pinheiro & Bates, 2000) are ...
rainbowmiha's user avatar
2 votes
1 answer
49 views

Correlation between random intercept and covariables in generalized mixed models

I'm little bit struggle this 4 past days about a specification of a likelihood in the context of correlation between a random intercept and covariables in generalized mixed models. A known approach is ...
Mangnier Loïc's user avatar
3 votes
1 answer
2k views

Understanding nested random effects - why is an interaction between factors involved?

I have read this question and answers: Crossed vs nested random effects: how do they differ and how are they specified correctly in lme4? however, I am struggling to understand why, provided that ...
Robert Long's user avatar
  • 60.8k
2 votes
1 answer
504 views

Identical standard error for multiple predictors in mixed effect model

I'm running a 2*2*2*2 mixed effects design in R using the lme4 package, on a number of different sets of similar data--running exactly the same model, just with a ...
Henry Brice's user avatar
0 votes
1 answer
55 views

Repeated measures regression using GLMM if there are varying numbers of measurements per subject

Aim: To develop a predictive model for an infection, judged condition negative/positive by an assumed gold-standard. Data: Longitudinal data for a number of subjects, at each time point comprising a ...
Quatermain's user avatar
5 votes
1 answer
2k views

Why do we do crossed vs. nested vs. other random effects?

Let's try a theoretical example. I am trying to predict the math scores of students within schools. I see three ways I can model this with random effects: (1) I can "nest" the random effects. My ...
purpleostrich's user avatar
0 votes
0 answers
508 views

Random effects in a linear model using BayesFactor package: why do bayes factors vary?

I'm using the BayesFactor package with the lmBF and generalTestBF functions to compare different linear models that include participant as a random effect. Below is an example of one of these model ...
BrionyB's user avatar
1 vote
1 answer
48 views

Model with "Integer Inflated" distribution Y

Forgive the poor statistical lexicon, I am a naturalist. I am trying to find the best link function to build a model to estimate a response variable (Y) that has what I called an "Integer Inflated" ...
have fun's user avatar
  • 266
0 votes
0 answers
588 views

Predicting individual-level outcome with only group-level data

Suppose I have summary data from a number of different classrooms, and I want to model a binary outcome (pass/fail) for individual students. I have no individual-level data. I have some classroom ...
DWal's user avatar
  • 101
2 votes
1 answer
5k views

lme4 lmer() multilevel model: why do I have singular fit and a -1 correlation between random effects slope and intercept?

I'm running a varying intercepts varying slopes multilevel model with the lme4::lmer() function with no group level predictors and only one predictor: FilingFee to predict evictionfilingrate. I ...
chase171's user avatar

1
76 77
78
79 80
157