lme4 Questions
3
Solved
I'm trying to install the "lme4" library in R and RStudio, which worked before I was on an M1 Mac, but now it's not installing. The dependency that's having trouble is: "nloptr"...
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
4
I am attempting to build a mixed effects linear regression model using the lmer function in R. I am building a fixed effects and mixed effects model using the following code to justify the use of a...
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
2
Solved
Another cry for help with installing nloptr package on Linux (Ubuntu 14.04.4 LTS). I looked through many questions but did not manage to find a solution for this.
I am unable to install lme4 pack...
Baguette asked 12/7, 2016 at 15:20
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
I am working with physical activity data and follow-up pain data. I have a large dataset but for the shake of this example I have created a small one with the variables of my interest.
As my physic...
1
I would like to conduct a simulation-based power analysis for a linear mixed model in lmer with repeated measures from scratch. I understand that simr might be the package to go with. However, I do...
Cretic asked 25/1, 2022 at 15:30
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
1
Solved
I am currently trying to plot a the outcome of an lme4::lmer function, following this tutorial. I've tried the code in the tutorial, and it works as intended.
In the tutorial a column pred_dist is ...
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
3
Solved
I have a mixed effects model and I would like to see the R²- and p-value. I thought this is acessible by summary() but it's not. Or at least I don't recognize it.
> summary(fit1.lme <- lmer(l...
7
Solved
I have a mer object that has fixed and random effects. How do I extract the variance estimates for the random effects? Here is a simplified version of my question.
study <- lmer(Reaction ~ Days...
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
2
Solved
library(Matrix)
library(lme4)
data <- lme4::sleepstudy
model1 <- lm(Reaction ~ Days, data = data)
model2 <- lmer(Reaction ~ 1+Days+(1+Days|Subject), data = data)
summary(model1)
summary...
1
Solved
I am using lmerTest::lmer() to perform linear regression with repeated measures data.
My model contains a fixed effect (factor with 5 levels) and a random effect (subject):
library(lmerTest)
model...
Fideliafidelio asked 14/1, 2021 at 16:59
1
Solved
I'm new to package mice in R. But I'm trying to impute 5 datasets from popmis and then fit an lmer() model with() each and finally pool() across them.
I think the pool() function in mice() doesn't ...
Alienism asked 8/11, 2020 at 6:36
0
I am using RStudio to create some logistic regression models based on data I collected. I created several different models using glmer() and they worked fine until a few weeks ago. Now when I run t...
1
I'm having trouble installing the lme4 package from CRAN on Ubuntu 18.04. I'm running install.packages("lme4") on R 3.4.4 and get the following error:
ERROR: configuration failed for pack...
5
Let us say I have fitted a model such
mymodel <- lmer(Y~X1+(1|fac1)+(1|fac2),mydata)
How can I extract just the random effects part of the formula ((1|fac1)+(1|fac2)) ?
I know I can do
formula(...
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
Solved
I am trying to manually plot model estimates on top of data. My real problem is far more complicated than this, so I want to avoid using predict if I can, and would prefer to understand how these p...
1
I get the following warning from glmer:
m <- glmer(cbind(Y, N) ~ c1 + c2 + c3 + (1|g1:Year) + (1 + c1 + c2|g1) + (1|g1:Site),
family = binomial, data = data,
control = glmerControl(optimize...
4
Solved
The qqmath function makes great caterpillar plots of random effects using the output from the lmer package. That is, qqmath is great at plotting the intercepts from a hierarchical model with their ...
Room asked 12/12, 2012 at 20:20
1 Next >
© 2022 - 2025 — McMap. All rights reserved.