Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Linear model with random variable [migrated]

I am trying to run a linear model to investigate whether chick SMI correlates with the parent's number of foraging trips with package lme4 in R. Since chicks can come from the same parent, I struggle ...
Sussie Kanin's user avatar
0 votes
0 answers
56 views

Can I use the segmented package with a generalized linear mixed model?

I am working on a grant proposal evaluating the effectiveness of an intervention on several different groups of hospitals and after some statistical consulting have landed on using a generalized ...
Thea B.'s user avatar
-1 votes
0 answers
44 views

step() and mixed model in R [closed]

I built my mixed models with function lme4::lmer() and lme4::glmer() and tried to do the stepwise method. Unfortunately step() or stepAIC() didn't work with lme4::lmer() neither lme4::glmer(). Did ...
Phuong Nguyen's user avatar
0 votes
1 answer
65 views

Why is glmer function for logistic regression taking so long to run in R?

I am running a multiple logistic regression model. The dataset has ~350,000 observations, with the outcome being a binary 0/1 dichotomous variable. Most predictors are also dichotomous but there are ...
flailing-in-r's user avatar
0 votes
0 answers
29 views

Why won't my multilevel model converge in R (lme4)?

i have a multilevel model at firm and local authority district level, with both firm level and LAD level predictors. It is a binary logistic model, the outcome is presence of women on the board of a ...
Anya's user avatar
  • 1
0 votes
0 answers
25 views

How to bootstrap ANOVA type 3 fixed effects of a linear mixed model in R (lme4)?

I've been trying to bootstrap a linear mixed model with three 2-level categorical fixed factors (and all two-way interactions), and one random factor. I can get the linear mixed model to run, I can ...
Laura Dawson's user avatar
0 votes
0 answers
66 views

How to use emmeans for contrast/pairwise comparison when fixed-effect model matrix is rank deficient?

I have a data with 3 fixed effect factors G (two levels g1 and g2), V (two levels v1 and v2) and C (c1,c2,c3,c4,c5,c6,c7), and a random effect ID. I need to fit a linear mixed model or robust lmm with ...
ksing's user avatar
  • 39
1 vote
1 answer
59 views

fixed-effect model matrix is rank deficient so dropping 5 columns / coefficients (lme4 package) after grouping age into four categories

This question appears to be a duplicate, I am however unable to resolve my case by looking at the existing suggestions on my model. I am trying to fit the three-level random intercept model. The idea ...
Amelia Nicodemus's user avatar
0 votes
2 answers
133 views

Ggplot visualization of Lmer output

I'm trying to visualize lmer output with ggplot, but cannot get the result I want. The code looks as follows: model <- lmer(Fluency ~ Roundnr * relevel(as.factor(Condition), ref='C3') * block + (1|...
Emma van Zoelen's user avatar
1 vote
1 answer
78 views

I get an error when I run my model: "Error in family$family : $ operator not defined for this S4 class"

How do I resolve the error: "Error in family$family : $ operator not defined for this S4 class", when running a zipoisson model in this code? I have tried a poisson model and a quasi poisson ...
Siddharth Satishchandran's user avatar
1 vote
1 answer
50 views

Does mediate() in r work with a multicategorical predictor?

My data is multilevel (multiple measures for each participant within each condition) with 3 conditions. DV = continuous; Mediator = continuous; IV = categorical (with 3 conditions: control, condition ...
stats.guy.412's user avatar
2 votes
2 answers
85 views

R commands behave incorrectly when converted to a function: failed evaluation of variable in for loop

I have the following reproducible example, which calculates a simple neighbourhood cross validation on a mixed regression model. As shown, if I turn the group of commands into a function, they behave ...
Dimetre Triadis's user avatar
1 vote
1 answer
30 views

glmer singular fit after small change in the data

I'm running univariate analyses to search for biological factors related to my disease outcome. I am dealing with related individuals, meaning I am using glmer adjusting for covariates and family ...
be_nice's user avatar
  • 23
0 votes
2 answers
46 views

GLMM - similar estimated means across software but differing fixed effect estimates

I have run a GLMM using glmer (from lme4) in R. The fixed effects estimates are very different (much smaller) than expected in comparison to the estimated marginal means. GLMM OUTPUT `Generalized ...
nalee_psych's user avatar
0 votes
1 answer
45 views

Workaround for Overfit Model in glmer()

I am analyzing how variable Y increases with variable X with a random intercept based on Z. Currently, I have this model fit: m1 <- glmer(Y ~ scale(X) + (1 | Z), data = d, family = ...
borntoreadforcedtocode's user avatar

15 30 50 per page
1
2 3 4 5
120