AnestisTouloumis / multgee

GEE solver for correlated nominal or ordinal multinomial responses using a local odds ratios parameterization.
https://CRAN.R-project.org/package=multgee
9 stars 1 forks source link

Making the solvers compatible with MICE multiple imputation #7

Open Generalized opened 3 months ago

Generalized commented 3 months ago

Dear @AnestisTouloumis , Would it be very complicated technically to make the solvers (for example ordLORgee) work with multiply imputed datasets of class "mids"? This is an object created by the mice package, storing all multiply imputed datasets.

Unfortunately, when I try to fit the model through the mice approach using its "with()" function, it fails:

with(imp_data_longit, 
                              ordLORgee(formula  = ODIPain ~ Visit * Arm + Age_centered + Age_centered : Visit,
                                        id       = PatientId, 
                                        repeated = as.numeric(Visit), 
                                        LORstr   = "category.exch",
                                        link = "logit")
                            )

Error in eval(predvars, data, env) : object 'ODIPain' not found

while this column does exist in the data: obraz

I would like to use it with the emmeans package, which can handle a list of multiply imputed models, but this way I'm unable to.