2

For multinomial and ordinal models in R via the nnet package and MASS package, respectively, how do I get an LRT, Wald test, and Rao score test for the full model and various groups of coefficients within the model? For example, given the following data:

educ <- runif(21483, min = 0, max = 20)
df <- cbind(gss_cat[, c("marital", "race")], educ) #gss_cat is from the package forcats

if my model is:

model <- multinom(marital ~ race*educ, data = df)

How would I get a global test of the interaction via LRT, Wald, and score tests in R?

How would I test the interaction term separately from the main effect and vice versa using the Wald test statistic?

Alejandro Andrade
  • 2,196
  • 21
  • 40
Michael
  • 111
  • 9
  • Did you try posting this question also over at Cross Validate, the SE stats site? https://stats.stackexchange.com/ – Conner M. Jan 04 '20 at 17:13
  • I posted it earlier but got no responses. Not sure if it was on CV or not. – Michael Jan 04 '20 at 17:15
  • It's not entirely clear what tests you're trying to implement, but it looks like the regTermTest in the survey package might have some of the functionality that you need. http://r-survey.r-forge.r-project.org/survey/html/regTermTest.html – Conner M. Jan 04 '20 at 17:38
  • Not sure what isn't clear tbh. These are common tests even in multinomial regression. The Wald test to group and test coefficients together. Or the global test for the null that all coefficients together are 0 using LRT, Wald, and Rao score. That's what I'm looking for. – Michael Jan 04 '20 at 20:03
  • 1
    Indeed Michael. If you have the statistical background this question seems simple to implement. Albeit the LRT can still be obtained using `anova(fit1, fit2)`, while it doesn't implement the score or wald test. The LRT is obtained by comparing the `logLik` values. – Oliver Jan 04 '20 at 22:09
  • This isn't actually for me but for lower level students. That's why I was hoping to find something more "automated" that resembled what SAS does. – Michael Jan 05 '20 at 06:05
  • Could you remind us what SAS does? Perferably both code and output or the relevant documentation. – Anders Ellern Bilgrau Jan 05 '20 at 19:23
  • ```proc logistic data=in desc; class race /param=ref; model marital = educ race educ*race /link=glogit; output out=predicted predprobs=individual; run;``` – Michael Jan 11 '20 at 01:17

0 Answers0