Multifractional polynomial with mixed-effects logistic model


Unfortunately, I posted this question on cross-validated and have yet to get an answer (see here).
I am working on a dataset collected from more than 20 hospitals. I used the glmer command to estimate a mixed-effects logistic regression model with the following as patient-level predictors:

  • age (patient’s age; a continuous variable),
  • cci (Charlson Comorbidity Index; a continuous variable),
  • sex (patient’s sex; man vs. woman),
  • race (patient’s race; Asian vs. Black vs. South Asian vs. White), and
  • htn (has hypertension vs. no hypertension).

I used the hospital variable (the hospital that recruited patients) to estimate the random intercept.


My code for mixed-model (worked very smoothly):
mixed_died30in <- glmer(died30in ~ age + cci + sex + race + htn + infx_source + (1 | hospital), data = passem, family = binomial, control = glmerControl(optimizer = "Nelder_Mead"), nAGQ = 10)

Then I used the mfp command:
mfp_died30in <- mfp(glmer(died30in ~ fp(age, df = 4, select = 0.05) + fp(cci, df = 4, select = 0.05) + sex + race + htn + infx_source + (1 | hospital), family = binomial, data = passem, control = glmerControl(optimizer = "Nelder_Mead"), nAGQ = 10))

The following error appeared:

Error in fixed.only && random.only : invalid 'x' type in 'x && y'
In addition: Warning message:
In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model is nearly unidentifiable: large eigenvalue ratio
 - Rescale variables?


  • Does the mfp command from the mfp package in R support mixed-effect models?
  • Is (are) there any problem(s) in my code?

Any help would be so appreciated

I doubt that a method that does stepwise variable selection will work in many contexts. But you need to put this question to the maintainer of that function.

1 Like

Thank you so much Professor, I will contact the maintainer :hibiscus:

I will reply on Cross-validated with a couple of ideas.

1 Like