[R] doubt about DF in survival model

Thomas Lumley tlumley at u.washington.edu
Fri Jul 5 18:58:40 CEST 2002


On Thu, 4 Jul 2002, Ronaldo Reis Jr. wrote:

> Hi all,
>
> I have this,
>
> Weibull distribution
> n= 1000
>
> > anova(pk.m0)
>      Df Deviance Resid. Df   -2*LL P(>|Chi|)
> NULL NA       NA       999 1451.31        NA
>
> > anova(pk.m0,pk.m1)
>       Terms Resid. Df    -2*LL    Test Df   Deviance    P(>|Chi|)
> 1         1       998 1451.310         NA         NA           NA
> 2      seed       996 1229.714          2  221.59557 7.605594e-49
>
> With   n=1000,
> Df of  Null Model (pk.m0) = 999, it is ok, to me.
>
> But, when I put together Null Model (pk.m0) and the Seed Model (pk.m1),
> Df of the Null model changed to 998.
>
> My question is, why it does happen?

It's actually the first one that's wrong.  The null Weibull model has 2
parameters, shape and scale.  The shape parameter is estimated by maximum
likelihood and isn't independent of the regression parameters, so it
really should be counted.

It doesn't matter if you use one or other syntax consistenly, since you
only care about differences in loglikelihood, but it should be fixed.

	-thomas



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list