rlogistic-regressionglmordinalr-mice

Can MICE pool results of ordinal logistic regression run by the function polr()?


I'm running the data set downloaded from UCLA

read.dta("https://stats.idre.ucla.edu/stat/data/ologit.dta")

and randomly assign some missing values in the independent variables: pared, public, and gpa. Then I use mice to generate imputed values and run the ordinal logistic regression for the 5 complete data set with imputed values.

DAT.imp=mice(DAT,print=FALSE)
DAT.fit.mice.plr = with(DAT.imp, polr(apply ~ pared + public + gpa))
summary(DAT.fit.mice.plr)

But the error message shows as follows:

Error in as.data.frame.default(x) : 
 cannot coerce class ""polr"" to a data.frame

Is it a problem because the pool() function cannot run models not belong to lm? Should I run the model by polr() separately for the 5 imputed data sets and manually pool them? Thanks in advance for any response.


Solution

  • I tried to install the newest versions of packages with depencies:

    install.packages(c("mice", "MASS"), dep = TRUE)

    and got results
    > summary(pool(mod)) estimate std.error statistic df p.value pared 1.088364240 0.2675445 4.0679748 388.8699 5.744000e-05 public -0.007057661 0.3020328 -0.0233672 376.9368 9.813694e-01 gpa 0.628030991 0.2610602 2.4056945 387.3003 1.660783e-02 unlikely|somewhat likely 2.250628213 0.7816727 2.8792461 386.0658 4.206607e-03 somewhat likely|very likely 4.353582378 0.8076085 5.3907086 385.6545 1.219831e-07 and

    > pool(mod) Class: mipo m = 5 estimate ubar b t dfcom df pared 1.088364240 0.07111586 0.0003868321 0.07158006 395 388.8699 public -0.007057661 0.08973729 0.0012387621 0.09122381 395 376.9368 gpa 0.628030991 0.06759665 0.0004631305 0.06815241 395 387.3003 unlikely|somewhat likely 2.250628213 0.60530521 0.0047558921 0.61101228 395 386.0658 somewhat likely|very likely 4.353582378 0.64589464 0.0052807731 0.65223157 395 385.6545

    riv lambda fmi pared 0.006527356 0.006485026 0.01155566 public 0.016565181 0.016295247 0.02147350 gpa 0.008221658 0.008154614 0.01323709 unlikely|somewhat likely 0.009428418 0.009340353 0.01443286 somewhat likely|very likely 0.009811086 0.009715764 0.01481172

    which are slightly different. The reported statistics are also slightly different. I'm not sure it is correct(only due to imputations). However the codes run well without error.