Dear Peter,

Many thanks for the reply.

Sure, this is just an example and it makes zero sense!

Regards,
Dunia

2012/3/4 peter dalgaard <pdalgd@gmail.com>

>
> On Mar 4, 2012, at 12:21 , Dunia Scheid wrote:
>
> > Dear all,
> >
> > I am fitting a GLM similar to
> >
> > library(MASS)
> > anorex.1 <- glm(Treat~Postwt+Prewt,family = binomial, data = anorexia)
>
> I hope that's just for an example. The actual analysis makes zero sense to
> me...
>
> >
> > I have found two ways of computing the p-value of the fitted model:
> > pval1 <- 1-pchisq(anorex.1$deviance,anorex.1$df.residual)
> > pval2 <- 1-pchisq(anorex.1$null.deviance - anorex.1$deviance,
> >                  anorex.1$df.null - anorex.1$df.residual)
> >
> > pval2 is testing LR chi2 from the null model, but what does pval1 says?
>
> Not much in binary logistic regression. If you have binomial data with np
> > 5 in all cells, it is a goodness of fit test -- LR comparison to
> saturated model. (If n=1 it can be shown to be a function of the parameter
> estimates, so pretty useless as a model test.)
>
> >
> > Many thanks in advance,
> > Dunia
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@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.
>
> --
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Email: pd.mes@cbs.dk  Priv: PDalgd@gmail.com
>
>
>
>
>
>
>
>
>

	[[alternative HTML version deleted]]

