Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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
9 views

Bayesian estimation in 2x2 mixed design study

I'm trying to correctly set up Bayesian parameter estimation for a mixed-design study with one 2-level between-groups independent variable and one 2-level within-subjects independent variable. The ...
0
votes
1answer
27 views

Interpreting lme4's interaction effects in linear model

I am struggling to understand how lme4 reports interaction effects and how to interpret what is reported. I know there are a ton of lme4 questions and answers on this site, and I'm trying to read ...
0
votes
0answers
6 views

Repeated Measures with Nested Random Effects [on hold]

I'm working on a study involving cookie recipes. There are 3 levels of sugar: half, normal, and double. Within each level of sugar, there are 3 random batches, labeled 1 to 9. On 3 consecutive days, 5 ...
0
votes
0answers
4 views

Two-way mixed ANOVA - do I need to transform pretest AND posttest

I am conducting a two-way mixed ANOVA on intervention data from a randomized controlled trial (i.e., my within-subject factor is time, and my between-subject factor is treatment condition). My ...
0
votes
0answers
15 views

Linear models and multiple comparisons on time-series data

I have conducted a study on subjects corresponding to two groups G1 and G2. Each subject in the group was tested under two conditions C1 and C2. The testing under each condition was done across a ...
1
vote
1answer
23 views

linear mixed model: visualising fixed effect and interaction with continuous variable (with confidence interval)

My aim is to analyse the blood concentration of a biomarker and its annual increase in four different subject groups using longitudinal measurements, i.e. biomarker concentrations of each subject were ...
0
votes
0answers
11 views

Need help selecting ROPE limits for a Bayesian multilevel model

I am using brms to estimate a Bayesian multilevel (mixed effects) zero-inflated beta regression model and want to use the HDI+ROPE (region of practical equivalence) ...
0
votes
1answer
13 views

What if the dispersion parameter of a glmm model is not around 1?

I am using the glmer function in package "lme4". The results shows that: AIC BIC logLik deviance df.resid 96.7 105.5 -44.4 88.7 62 So the dispersion parameter is ...
1
vote
1answer
62 views

Mixed Effect Models - choice of the random intercept

I'm using the glmer function from lme4 package to model a binomial phenomena in a human DNA dataset. An allele can be missing (1) or not (0). The dataset is created with 10 different samples. Each ...
0
votes
0answers
8 views

REPEATED MEASURES DESIGN

I am not sure how the results of this study should be analysed given its design. I have searched everywhere for this info on this TYPE of experimental design and have had no luck. I don't even know ...
0
votes
1answer
37 views

Singular fit error caused by random factor

I'm trying to fit a generalised mixed model for some embryo data and I am getting the error for singular fit. my model is ...
1
vote
0answers
37 views

Dealing with heteroscedasticity and non-normality in a mixed model

I am trying to fit a mixed model (person as random effect) on data which has heteroscedasticity and non-normality. I log-transformed the Y-variable but it did not fix the problem. Normality and ...
1
vote
0answers
11 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 ...
1
vote
1answer
22 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 ...
1
vote
0answers
16 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 ...
1
vote
0answers
23 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 ...
0
votes
0answers
7 views

How to calculate contrast for mixed designs with spss syntax? [on hold]

We are trying to understand how to calculate a planned contrast for a mixed model ANOVA with SPSS syntax. We have two factors one within (IMI) and one between (<...
0
votes
1answer
34 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 ...
1
vote
1answer
28 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. ...
0
votes
0answers
18 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. ...
0
votes
0answers
20 views

How to determine predictor importance at each level of an HLM model

I am working with a Hierarchical Linear Model (HLM). I want to determine which predictors are important at each level of the data. Across different hierarchical levels the fixed effects along with the ...
1
vote
0answers
21 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 ...
0
votes
1answer
32 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...
0
votes
0answers
22 views

Non-positive variance-covariance in a linear mixed model

I have some problem with my lienar mixed model. When I do my model with the maximum likelihood, I have no error. But, when I want the confidence intervals, I get the Error : " cannot get confidence ...
0
votes
0answers
18 views

Can we apply statistics on replicated data (Nested repeated measure)?

In my study I have 2 groups i.e controls (n=23) and patients (n=30). And again in patients, I have 2 sub-groups i.e subgroup1 (n=15) and subgroup2(n=15). I have spinal cord area (SCA) at 4 different ...
1
vote
1answer
26 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 ...
10
votes
1answer
221 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 ...
3
votes
0answers
47 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 ...
1
vote
0answers
24 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: ...
0
votes
0answers
32 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 ...
2
votes
1answer
23 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 ...
0
votes
1answer
36 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 ...
3
votes
2answers
33 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 ...
0
votes
0answers
16 views

Interpret model estimates after log transformation [duplicate]

I asked this question before, but maybe on the wrong audience at math.stackexchange.com. So, sorry for the redundancy. I sat up a mixed-effects linear model with the dependent variable log-...
1
vote
0answers
15 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 ...
0
votes
1answer
26 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, ...
1
vote
1answer
34 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: ...
2
votes
1answer
31 views

Minimum no. of grouping variables in mixed models

I have data where I collected y and predictors x1, x2, x3...
1
vote
1answer
36 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 ...
2
votes
1answer
27 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 ...
0
votes
0answers
23 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: ...
0
votes
0answers
18 views

Fixed/Mixed effects models - emmeans, contrasts, etc

I'm taking a GLMM course and working through some homework that conceptually isn't that difficult, but is very challenging with respect to implementation in R. The dataset is composed of ...
0
votes
0answers
12 views

Comparing cage average values… weighted, pooled, nested?

I want to compare food consumption between three treatment groups. Each treatment group had 20 individuals, however, due to logistical constraints they were group housed in cages with 2-3 individuals ...
0
votes
0answers
27 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 ...
4
votes
1answer
38 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 ...
2
votes
1answer
35 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 ...
2
votes
1answer
57 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 ...
4
votes
3answers
70 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 ...
3
votes
1answer
33 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 ...
1
vote
1answer
29 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 ...