[R] Multivariable Wald to test equality of multinomial coefficients
Paul Sanfilippo
prseye at gmail.com
Tue Oct 4 00:30:03 CEST 2016
Hi,
I am trying to replicate a test in the Hosmer - Applied Logistic regression text (pp 289, 3rd ed) that uses a Multivariable Wald test to test the equality of coefficients across the 2 logits of a 3 category response multinomial model. I’d like to see whether (from a statistical standpoint) it is acceptable to collapse the 2 response categories and then simply use a binary logistic regression. The idea is that if the coefficients across the 2 logits are similar (non-significant p value with Wald test), then it is reasonable to pool the categories.
There does not seem to be a built in way to do this in R?
Using the mtcars dataset as an example (for the sake of the example, using cyl as a 3-factor response), does anyone have any ideas how to do this
library(nnet)
data(mtcars)
mtcars$cyl <- as.factor(mtcars$cyl)
mtcars$am <- as.factor(mtcars$am)
mod <- multinom(cyl ~ am + hp, data=mtcars)
summary(mod)
> summary(mod)
Call:
multinom(formula = cyl ~ am + hp, data = mtcars)
Coefficients:
(Intercept) am1 hp
6 -42.03847 -3.77398 0.4147498
8 -92.30944 -26.27554 0.7836576
So, I want to simultaneously test whether the 3 coefficients across the 2 logits are similar.
Thank you.
[[alternative HTML version deleted]]
More information about the R-help
mailing list