Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

predict_response causes "R Session Aborted" with glmer model #636

Open
coanv opened this issue Feb 13, 2025 · 0 comments
Open

predict_response causes "R Session Aborted" with glmer model #636

coanv opened this issue Feb 13, 2025 · 0 comments

Comments

@coanv
Copy link

coanv commented Feb 13, 2025

Hello!

I am analyzing longitudinal panel data (the health and retirement study) using a mixed effects binary logistic regression model (glmer) with year and person random effects. When I try to use predict_response() I encounter a fatal error that terminates my R session. I am able to successfully run ggeffect(), but would like to understand why predict_response is causing this error.

Here is the model specification I am using
model <- glmer(haveccd ~ cdcombanly + gender + race*age_scl+race*I(age_scl^2)+coll+rmstat_c+employ+homeown+selfhlth+hhhres+loghinc_real+year2+(1|HHIDPN)+ (year2-1|HHIDPN) ,data=githubdta, family=binomial, control =glmerControl(optimizer="nlminbwrap", optCtrl = list(maxfun = 10000000)))

this causes my R session to abort
prdct<- predict_response(CH2_MCNF3,"cdcombanly",bias_correction = TRUE)

this runs without issue
prdct1 <- ggeffect(CH2_MCNF3,c("cdcombanly"), bias_correction = TRUE)

While this model includes quadratic interaction terms, I have encountered the same issue when running a model without age squared and with no interaction between race and age.

I have attached a csv of the data I am using.

githubdta.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant