Multifractional polynomial with mixed-effects logistic model Dataset
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.
Problem
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?

Questions

*

*Does the mfp command from the mfp package in R support mixed-effect models?

*Is (are) there any problem(s) in my code?


You have both an error:
Error in fixed.only && random.only : invalid 'x' type in 'x && y'
For the former, you could check that both age and cci are numeric rather than factor objects? I can't see any other clues as to this error message, which seems to crop up in lots of different settings.
And a warning:
In addition: Warning message:
In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model is nearly unidentifiable: large eigenvalue ratio
 - Rescale variables?
This may be due to age in particular needing centering/scaling before analysis? Though apparently rescale=TRUE is the default option.
