I ran a multinomial logit model in JMP and got back results which included the AIC as well chi-squared p-values for each parameter estimate. The model has one categorical outcome and 7 categorical explanatory vars.
I then fit what I thought would build the same model in R, using the multinom
function in the nnet package.
The code was basically:
fit1 <- multinom(y ~ x1 + x2 + ... xn, data=mydata);
summary(fit1);
However, the two give different results. With JMP the AIC is 2923.21, and with nnet::multinom
the AIC is 3116.588.
So my first question is: Is one of the models wrong?
The second thing is, JMP gives chi-squared p-values for each parameter estimate, which I need. Running summary on the multinom fit1
does not - it just gives the estimates, AIC and Deviance.
My second question is thus: Is there a way to get the p-values for the model and estimates when using nnet::multinom
?
I know mlogit is another R package for this and it looks like its output includes the p-values; however, I have not been able to run mlogit
using my data. I think I had the data formatted right, but it said I had an invalid formula. I used the same formula that I used for multinom
, but it seems like it requires a different format using a pipe and I don't understand how that works.