1

I've got a dataset with a multinomial response variable and continuous predictor variables, and am trying to find out the AIC, F, p value, and proportion of explained variance for each of the predictor variables for each category of the response variable, and in order to find the best predictive model. I'm using the functions multinom (from nnet) and stepAIC (from MASS), and while I seem to be able to get an optimal model and its AIC, I don't understand how to gain individual variable AIC, F, p values and proportion of explained variance.

The code I'm using is:

library(nnet)
library(MASS)
model<-multinom(Age~HeightD+HeightI+Inclination+HalfWidth+BaseWidth+WidthRatio+BaseDepth+HalfDepth+DepthRatio,data=comp_data)

summary(model)
step <- stepAIC(model, direction="both")
step$anova
summary(step)

I'm quite new to stats and R so please excuse me if there's any really obvious mistakes/answers!

merv
  • 67,214
  • 13
  • 180
  • 245
Anthony BH
  • 11
  • 2

1 Answers1

0

As I remember, I think the multinom output doesn't provide all of the things you're asking for. Some of it you can calculate from the components of the model. The broom package has a method for summarizing the results of multinomial regressions. (make sure you install the version from GitHub)

#* Using example data from the broom::tidy.multinom function
library(devtools)
install_github("drgtwo/broom")

fit.gear <- multinom(gear ~ mpg + factor(am), data=mtcars)
tidy(fit.gear)
glance(fit.gear)

The AIC you get get from the glance output. You won't get F-statistics from multinomial regressions, but you can get Z statistics from the tidy output (it's really just the coefficient / se), and the associated p-values.

There isn't any comparable anova output for multinom objects, so I don't know what to tell you about explained variance. Except perhaps that aside from traditional analysis of variance and linear regression models, I've rarely used explained variance as a metric of model fit.

Benjamin
  • 16,897
  • 6
  • 45
  • 65
  • Thank you very much! I think I managed to get confused somewhere along the way and was trying to apply tests that weren't possible. – Anthony BH Aug 04 '15 at 15:11