[R] [Re: Running a likelihood ratio test for a logit model]

From: <isaia_at_econ.unito.it>
Date: Thu 18 May 2006 - 17:36:35 EST

?glm and have a look at the components of the list returned by the object (i.e. glm.mymodel) of class glm

(glm.mymodeld$null.deviance - glm.mymodeld$deviance)

best, isaia

Hi all --

    I have to calculate a likelihood ratio test for a logit model. I found logLik, but I need to calculate the log likelihood for the model without any predictors. How can I specify this in glm? If the full model is glm(y ~ x1), is the one without predictors (y ~ 0)? Or (y ~ 1)?

    Is there a more direct way of getting this?


~ Ennio D. Isaia
~ Dep. of Statistics & Applied Mathematics, University of Torino
~ Piazza Arbarello, 8 - 10122 Torino (Italy)
~ Phone: +39 011 670 57 29 ~~ Fax: +39 011 670 57 83
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu May 18 17:41:55 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 18 May 2006 - 18:10:11 EST.

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