mixed-models Questions
2
I'm attempting to implement mixed effects logistic regression in python. As a point of comparison, I'm using the glmer function from the lme4 package in R.
I've found that the statsmodels module h...
Flabby asked 25/2, 2020 at 21:43
2
Solved
I want to specify different random effects in a model using nlme::lme (data at the bottom). The random effects are: 1) intercept and position varies over subject; 2) intercept varies over compariso...
Kellum asked 15/4, 2016 at 9:46
3
I'm looking for suggestions for a strategy of fitting generalized linear mixed-effects models for a relative large data-set.
Consider I have data on 8 milllion US basketball passes on about 300 tea...
Chalaza asked 23/10, 2017 at 15:11
1
I have some repeated measures, ordinal response data:
dat <- data.frame(
id = factor(sample(letters[1:5], 50, replace = T)),
response = factor(sample(1:7, 50, replace = T), ordered = T),
x1 ...
Cycad asked 22/7, 2019 at 6:28
4
I am trying to use the Python statsmodels linear mixed effects model to fit a model that has two random intercepts, e.g. two groups. I cannot figure out how to initialize the model so that I can do...
Sheree asked 25/8, 2016 at 18:50
1
I have a dataset for one year for all employees with individual-level data (e.g. age, gender, promotions, etc.). Each employee is in a team of a certain manager. I have some variables on the team- ...
Lacerated asked 2/8, 2022 at 9:23
1
Solved
Example
library(glmmTMB)
library(ggeffects)
## Zero-inflated negative binomial model
(m <- glmmTMB(count ~ spp + mined + (1|site),
ziformula=~spp + mined,
family=nbinom2,
data=Salamanders,...
Myxomatosis asked 25/6, 2022 at 20:41
1
Solved
Suppose we have postulated the following linear mixed model (LMM), which we generically call fit.
library(lme4)
fit <- lmer(Reaction ~ Days + (1 | Subject), data = sleepstudy)
Suppose that we ...
Kristikristian asked 11/1, 2022 at 4:47
4
I need to run a logistic regression on a relatively large data frame with 480.000 entries with 3 fixed effect variables. Fixed effect var A has 3233 levels, var B has 2326 levels, var C has 811 lev...
Brubaker asked 20/2, 2015 at 16:47
2
I am using the lme4 package for linear mixed effect modeling
The mixed-effect model is:
fm01 <- lmer(sublat <- goal + (1|userid))
The above command returns an S4 object called fm01.
This obj...
Horne asked 16/10, 2014 at 19:42
2
Solved
I can use gls() from the nlme package to build mod1 with no random effects.
I can then compare mod1 using AIC to mod2 built using lme() which does include a random effect.
mod1 = gls(response ~ fi...
Mella asked 3/6, 2014 at 16:4
2
I found that the predict function is currently not implemented in cumulative link mixed models fitted using the clmm function in ordinal R package. While predict is implemented for clmm2 in the sam...
Sterigma asked 10/2, 2017 at 1:43
1
How do I fit a ordinal (3 levels), logistic mixed effect model, in R? I guess it would be like a glmer except with three outcome levels.
data structure
patientid Viral_load Adherence audit_score vi...
Chavaree asked 19/5, 2021 at 17:0
1
Solved
I have some high dimensional repeated measures data, and i am interested in fitting random forest model to investigate the suitability and predictive utility of such models. Specifically i am tryin...
Tivoli asked 13/2, 2021 at 17:50
7
Solved
In lm and glm models, I use functions coef and confint to achieve the goal:
m = lm(resp ~ 0 + var1 + var1:var2) # var1 categorical, var2 continuous
coef(m)
confint(m)
Now I added random effect t...
Quinby asked 17/6, 2012 at 15:36
1
Is it possible to run a mixed-effects regression model in Spark? (as we can do with lme4 in R, with MixedModels in Julia or with Statsmodels MixedLM in Python).
Any example would be great.
I've re...
Viafore asked 30/9, 2016 at 11:47
2
I am a bit confused about the output of Statsmodels Mixedlm and am hoping someone could explain.
I have a large dataset of single family homes, including the previous two sale prices/sale dates f...
Merv asked 27/11, 2017 at 0:12
1
Solved
I'm following this tutorial as well as ?eff_size from package emmeans to compute eff_size() for my regression model below.
But I get the error: need an object with call component from the eff_size...
Dunite asked 20/5, 2020 at 1:13
1
In my R code, I use the MixedModels Julia package.
I integrate Julia in R using the JuliaCall package.
I work with very large datasets (~1 GB, ~4x10^6 observations) and at the modeling step (mixe...
Particia asked 2/4, 2020 at 20:52
2
Solved
I can get the significance of pairwise comparisons with the following code
m <- lmer(angle ~ recipe*temp + (1|replicate), data=cake)
emtrends(m, pairwise~recipe, var="temp")
$emtrends
recipe ...
Burmese asked 4/2, 2019 at 14:13
2
Solved
I have following model
x <- rep(seq(0, 100, by=1), 10)
y <- 15 + 2*rnorm(1010, 10, 4)*x + rnorm(1010, 20, 100)
id <- NULL
for(i in 1:10){ id <- c(id, rep(i,101)) }
dtfr <- data.fra...
Utilize asked 16/1, 2013 at 12:45
2
I am running several linear mixed models for an study about birds with the variable nest as a random variable. The thing is that in some of these models I get what is called 'singular fit': my nest...
Basrelief asked 8/2, 2019 at 17:28
1
I have to run a lmer with a log transformed response variable, a continuous variable as fixed effect and and a nested random effect:
first<-lmer(logterrisize~spm + (1|studyarea/teriid),
data =...
Raccoon asked 28/10, 2018 at 17:30
1
Solved
dput for data,
copy from https://pastebin.com/1f7VuBkx (too large to include here)
data.frame': 972 obs. of 7 variables:
$ data_mTBS : num 20.3 22.7 0 47.8 58.7 ...
$ data_tooth: num 1 1 1 1 1 1 ...
Lorca asked 24/5, 2018 at 9:6
1
I have behavioral data for many groups of birds over 10 days of observation. I wanted to investigate whether there is a temporal pattern in some behaviors (e.g. does mate competition increase over ...
Bedsore asked 12/4, 2018 at 12:10
1 Next >
© 2022 - 2024 — McMap. All rights reserved.