Questions tagged [random-effects]
238 questions
1
vote
1 answer
understanding lmer random effects in R
What is the point of the "1 +" in (1 + X1|X2) structure of the random effect of an lmer function in lme4 package of R, and how does this differ from (1|X1) + (1|X2)?

kriggs
- 11
- 1
1
vote
0 answers
Species-by-year random effects in a GLMM (point count data)
SUMMARY
I'm analyzing avian point count data using glmmTMB.
I'm trying to estimate year-specific mean abundance for each species.
Models with interactions of fixed terms are not working, I think because
limited data are split across several…

G. Channing
- 41
- 3
1
vote
0 answers
What is the difference between 1|block:run and 1|(block:run)?
Study design is an incomplete randomized block design. Fixed effects are maturity (covariate/continuous variable) and type (A, B, or C). There are 20 total samples with 7 of two types and 6 of one type. Samples were put into blocks with at least one…

yaynikkiprograms
- 99
- 1
- 7
1
vote
1 answer
How to compare the slope of interaction variables in mixed effect model in r
I want to test the effects of island area and land use, and the interaction between island area and land use on species richness. For land use, I have three groups, namely forest, farmland and mix. The data is based on transects on different…

Yuhao Zhao
- 29
- 5
1
vote
0 answers
Dropping Random effect term in predict() from glmmTMB
I am running a generalized linear mixed effect model using the glmmTMB package to analyse number of bite wounds in a wild predator.
my model:
Mod<-glmmTMB(all~Sex+class+sseason+timeR+class:timeR+(1|Microchip)+(1|olre), data = mydata_select, family =…
1
vote
1 answer
lme4::lmer() With A -1?
I am looking at an lmer model that's been coded, and I don't quite understand what the -1 is / is doing. The code looks like fit = lmer(resids ~ -1 + (1|loc/time))
I believe the (1|loc/time) piece can be equivalently written as (1|loc) +…

Ryan S
- 73
- 6
1
vote
0 answers
Two fixed effects variables and one random effect? plm in r
I believe I have found a way of having three variables (ID, Time and type) as fixed effect using the plm function (where I have previously indexed the ("ID","Time") in pdata.frame):
FixedEffects <- plm(Y ~ x1 + X2 + factor(type),
…

Lucas Gomes
- 11
- 1
1
vote
1 answer
How to include nested effects in mixed effect model with lme4 package
I am studying mixed models and have a doubt about nested random effects..
In the example, we tested subjects variable X and outcome Y and want to see if X is correlated with Y. The data were collected on 8 different mountains in 3 different site…

FrAiello
- 73
- 1
- 1
- 7
1
vote
1 answer
Split plot design with nested random effects and interactions between random effects
I am trying to analyse a split plot design for a plant growth experiment with these variables:
Biomass (dependent variable)
Transect (sub plot factor with three levels)
Treatment (main plot factor with two levels)
Block (2 blocks in total, serving…

Ecologist
- 21
- 5
1
vote
1 answer
Generalized Additive Mixed Model (GAMM) in R mgcv Package Formula Implementation for Grouping Variable
I am attempting to use mgcv to model a non-linear multilevel model with Time as the primary independent variable + a level 2 covariate (Xc). Because these data are within-person, I would like the model to reflect the within-person responses at level…

aspark2020
- 341
- 2
- 17
1
vote
0 answers
R: Plotting Mixed Effect models plot results
I am working on linguistic data and try to investigate the realisation of the vowel in words such as NURSE. There are more less 3 categories that can be realised, which I coded as . I then measured Formant values (F1 and F2). Then I…

Tomikichi
- 47
- 1
- 5
1
vote
1 answer
what do the us, idh, idv stand for in the MCMCglmm in R
I am having hard time remembering the meaning of the us, idh, and idv functions in the MCMCglmm. I understand that these are the functions taking random variance-covariance structure into account, but are they abbreviations of some words in English?…

user11806155
- 121
- 5
1
vote
0 answers
R / PLM Package: How to include a nested effect for the same brands across countries?
I am currently analyzing a panel data set, which tracks brands across countries over time.In particular, I am interested in how certain variables are impacting future market share.
Using the head() function, my data set looks as followed:
# A…

Sven
- 11
- 2
1
vote
0 answers
Check for statistically significant differences between groups after running a logistic regression w/ interaction & random effect?
I ran an ordinal logistic regression (using the function clmm from the R package ordinal) with a two-factor interaction and a random effect.
The response is a factor w/ 5 levels (Liker scale: 1 2 3 4 5), the independent variables are a factor w/ 2…

elena_m
- 41
- 4
1
vote
0 answers
ICC per random factor for multilevel negative binomial regression
I have a multi-level negative binomial model fit with brms (library(brms))
fit1 <- brm(TOTAL_VIOLATIONS ~ LN_POP + Source_binary + Source_purchased + (1|TYPE_consolidated) + (1|COUNTY), data = Data, family = negbinomial())
This is what the data…

KDobb
- 11
- 3