1

I am running a multinomial regression using the multinom function of the R package nnet. The dataset I am using is an imputed one using MICE, and is therefore a mids object. I have not managed to obtain the coefficient names in the summary output of the multilevel model.

Here is a reproducible example using the dataframe on mice:

library(mice)
library(nnet)

test <- mice(nhanes2, meth=c('sample','pmm','logreg','norm'))

m <- with(test, multinom(age ~ bmi, model = T))
summary(pool(m))

m1 <- with(nhanes2, multinom(age ~ bmi, model = T))
summary(m1)

With the code above, the output of 'm' lists the coefficients as 1, 2, 3 and 4 instead of their variable names, which come out correctly with the output of 'm1'. Seems to be an issue with running the multinomial command on a mids object. Any suggestions on why this happens and what I can do about it?

It makes it really difficult to interpret the output, as in my actual model I will have several predictors.

Thanks!

user3257121
  • 255
  • 1
  • 3
  • 7
  • As well as dropping the names - it *might* be arranging the wrong se's with each coefficient. (as in comparison to `lapply(m$analyses, summary)` as `summary(m1)` , one seems rather large) – user20650 Sep 13 '17 at 14:23
  • hmmm... further quick look (using m1): in pool the coefficients are from `c(coef(m1))` (note order: intercepts then slopes) but se's from `sqrt(diag(vcov(m1)))` (note order different) - could be a bug. Maybe step through the code of `pool` to see if you agree. – user20650 Sep 13 '17 at 14:46

0 Answers0