[R] IIA test on multinomial logit

Erika Known e at it.dk
Tue Oct 14 21:37:25 CEST 2008


> ----- Original Message ----- 
> From: "Erika Known" <e at it.dk>
> To: <r-help at r-project.org>
> Sent: Tuesday, October 14, 2008 11:43 AM
> Subject: [R] IAA test on my multinomial logit
> 
> > Hi all
> >
> > I'm trying to immigrate from Stata and I want to preform a IIA test
> > (Independence of Irrelevant Alternatives) on my multinomial logit model
> > in R, but I can't seem to find a package that dos the trick. I've been
> > looking at
> >
http://bm2.genes.nig.ac.jp/RGM2/R_current/library/systemfit/man/hausman.systemfit.html
> > but I can't figure out what to do! I normally just type 'mlogtest,
> > hausman base' to get the test in Stata. I can even use 'mlogtest,
> > smhsiao base' to get the Small-Hsiao tests of IIA assumption.
> >
> > according to the literature there is also other tests.. thou I cant seem
> > to find any off them in R.
> >
> > Thank for the help.
> >
> > Erika

On Tue, 14 Oct 2008 12:11:45 -0500, Gilbert Brenes wrote
> If I'm not wrong, the test for IIA is the Hausman test.
> 
> Look for hausman.systemfit in the systemfit package.
> 
> Gilbert
> 
Hi again!

Thanks for your answer! Thou that's where I got stuck too, so to say.
The link I send was to the
systemfit package, but I can't seem to get it to working.

This is what I do:

model_01 <- multinom(Y ~ X1 + X2 + X3 + X4 + X5 + X6, data=data,
contrasts = NULL, Hess = TRUE, summ = 0, censored = FALSE, model = TRUE)

That's running like a dream! - and the I try:

> systemfit(model_01)
Error in systemfit(dyls.model01) : 
  argument 'formula' must be an object of class 'formula' or a list of
objects of class 'formula'
In addition: Warning messages:
1: In if (class(formula) == "formula") { :
  the condition has length > 1 and only the first element will be used
2: In if (class(formula) == "list") { :
  the condition has length > 1 and only the first element will be used
  
>hausman.systemfit(model_01)
Error in coef(results3sls) : 
  argument "results3sls" is missing, with no default
  
I relly want to imigrate, but I need help! Just tell mer a website or
wher I can read my way out of it.

Do you think you can give me one more hint?

Sorry for my ignorance

Erika



More information about the R-help mailing list