Questions tagged [random-effects]
238 questions
1
vote
0 answers
Multinomial mixed effect model in R
I would like to make a multinomial model with random effects, but I don't know how.
The model would look like this: native_driftertype ~treat+(1|replica)+(1|compartment/originhive),
with native_driftertype a factor with 5 levels, treat a factor with…
user21291330
1
vote
1 answer
How to input model specification for glmmLasso to get expected iterations?
I'm trying to run glmmLasso on some data with the subject IDs established as the groups for random effects. This is seen in several posted examples of glmmLasso and the example soccer data set included in the CRAN package.
However, whenever I try to…

trytryagain404
- 13
- 3
1
vote
1 answer
Can glmmLasso be used with the Tweedie distribution?
I have a linear mixed effects model and I am trying to do variable selection. The model is testing the level of forest degradation in 1000 sampled points. Most points have no degradation, and so the dependent variable is highly skewed with many…

Matt Marcus
- 13
- 3
1
vote
1 answer
Likelihood ratio for glmmTMB model?
I have a mixed model where I'm trying to find the significance of my random effect. The model is a mixed model with zero-inflated beta distribution which I built using the R package glmmTMB, with the following…

Cam
- 449
- 2
- 7
1
vote
0 answers
Where can I find the significance of my random effect for a GAMM in gamlss?
I created the following GAMM function using the R package gamlss:
model<-gamlss(Overlap~ Diff.Long + Diff.Fzp + DiffSeason +
random(Xnumber),family=BEZI(mu.link = "logit", sigma.link = "log",
nu.link =…

Cam
- 449
- 2
- 7
1
vote
0 answers
How to plot random effects in glmmTMB when modelling autocorrelation of irregular times (covariance structure)
The code below shows how the random effects (intercepts) of mixed models without autocorrelation terms can be extracted and plotted. However, this approach does not work when modelling autocorrelation in glmmTMB.
Use reproducible example data from…

Chris0083
- 11
- 1
1
vote
0 answers
R squared for random effects model after multiple imputation with mice
I'm having difficulties with calculating r squared (ideally between and overall r squared, but between is more important to me) for a random effects model after multiple imputation with mice. The function pool.r.squared() only works for lm objects.…

user19153338
- 43
- 3
1
vote
0 answers
How to perform Hausman test on mira objects after multiple imputation
I have used multiple imputation as provided by the mice package on my panel data (5 variables on annual basis, covering 3 years, 456 observations). Afterwards I estimated a fixed effects and a random effects model (thanks to this answer: Is it…

user19153338
- 43
- 3
1
vote
1 answer
Cluster-Robust Standard Errors for Lmer and Glmer in Stargazer (lme4 package)
I have an experimental data set in which subjects were assigned to a specific treatment.
Each treatment consisted of 5 groups. I want to estimate a model that that includes random effects on subject level and then cluster the standard errors by the…

Matthias Herrmann
- 71
- 7
1
vote
0 answers
How can I extract the random effects information from lmm and lqmm models using multiple imputed data?
Continuing from this question: Is it possible to use lqmm with a mira object?
I have tried to get the random effects for the mixed models (lmm and lqmm), and it has been…

De La Cruz
- 33
- 4
1
vote
0 answers
use.u=TRUE in bootMer function
I have a question about boostrapping confidence intervals for the random effects (BLUPs) of a multilevel model.
I'm currently using bootMer and there is an argument use.u=TRUE that allows one to treat the BLUPs as fixed instead of re-estimating…

jonnyf
- 198
- 8
1
vote
0 answers
Random effects in mixed effect models
I am studying some mixed effect models.
I am quite confused with the notation in R for example:
data(Orthodont,package =…

user3483060
- 337
- 2
- 13
1
vote
0 answers
Calculate conditional and marginal R2 from a gam/bam model
I have a generalised additive model calculated using the bam function from the mgcv package. I have two random effects in the model and 5 fixed effects, one of which is smoothed. The R2 are quite high (see below) and I'm interested to know if this…

mikejwilliamson
- 405
- 1
- 7
- 17
1
vote
2 answers
how to extract the random effect in multilevel modeling using lmer in r?
For example, this is the result of certain multilevel analysis
MLM1<-lmer(y ~ 1 + con + ev1 + ev2 + (1 | pid),data=dat_ind)
Linear mixed model fit by REML. t-tests use Satterthwaite's method ['lmerModLmerTest']
Formula: y ~ 1 + con + ev1 + ev2 + (1…

yoo
- 491
- 3
- 10
1
vote
2 answers
Comparing mixed models: singular fit for random effect group but only in some models. Should I drop RE group from all models or just where singular?
I am fitting several mixed models using the lmer function in the package lme4, each with the same fixed effects and random effects, but different response variables. The purpose of these models is to determine how environmental conditions influence…

Oscar Clendon
- 31
- 4