[R] [Re: Running a likelihood ratio test for a logit model]
isaia at econ.unito.it
isaia at econ.unito.it
Thu May 18 09:36:35 CEST 2006
?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
-------- Original Message --------
Subject: [R] Running a likelihood ratio test for a logit model
Date: Thu, 18 May 2006 02:20:54 -0500
From: Chris Bergstresser <chris at subtlety.com>
To: r-help at stat.math.ethz.ch
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?
-- Chris
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the R-help
mailing list