Re: [R] omnibus LR in multinomial model

From: Steven McKinney <smckinney_at_bccrc.ca>
Date: Fri, 20 Jun 2008 18:57:41 -0700


Is this what you were trying to do?
See intercept model and anova below.

HTH Steve McKinney

> -----Original Message-----
> From: r-help-bounces_at_r-project.org
[mailto:r-help-bounces_at_r-project.org]
> On Behalf Of markleeds_at_verizon.net
> Sent: Friday, June 20, 2008 3:47 PM
> To: r-help@stat.math.ethz.ch
> Subject: [R] omnibus LR in multinomial model
>
> If one estimates a model using multinom, is it possible to perform the
> omnibus LR test ( the analogue to omnibus F in linear models ) using
> the output
> from multinom ? The residual deviance is there but I was hoping I
could
> somehow pull out the deviance based on just using an intercept ?
> Sample code is below from the CAR book but I wasn't sure how to do it
> based on that example. Thanks for any insights.
>
>
> library(car)
> library(nnet)
>
> attach(Womenlf)
>
> participation <- ordered(partic, levels=c('not.work', 'parttime',
> 'fulltime'))
> print(participation)
>
> mod.multinom <- multinom(participation ~ hincome + children)
> print(mod.multinom)
> print(str(mod.multinom))

> mod.multinom0 <- multinom(participation ~ 1)
# weights: 6 (2 variable)
initial value 288.935032
final value 250.246281
converged
> anova(mod.multinom, mod.multinom0)

               Model Resid. df Resid. Dev Test Df LR stat. Pr(Chi)

1                  1       524   500.4926           NA       NA
NA
2 hincome + children       520   422.8819 1 vs 2     4 77.61064
5.551115e-16
>

>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 21 Jun 2008 - 02:03:06 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 21 Jun 2008 - 02:30:55 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive