2

I am trying to run the following multinomial regression specified as follows and get the table as an html through stargazer:

    ml1 <- multinom(as.factor(stabgroupsTH) ~  factor(pre_stab_group2) + factor(educ2) + agesup + black + male + mhd + stgyes + highrisk2 +  felony2 + dum_2005,  dd2)
summary(ml1)
stargazer(ml1,type="text")

I'm able to run a multinomial logit using nnet::multinom but not with only multinom. When I try using only multinom() I get the error message "could not find function "multinom"". Using nnet::multinom runs the model, but when I try to output the regression with stargazer I get the error "% Error: Unrecognized object type." I'm confused by 1) why only multinom cannot be found and why stargazer can't recognize the model object. The documentation for stargazer says that multinom is supported.

Thanks,

Simon

skol
  • 21
  • 2

1 Answers1

3

Try loading in nnet with library(nnet) instead of just calling multinom from the package with ::. Stargazer should have no problem printing the multinom object.

jjxu
  • 31
  • 1