Message-ID: <42318FDE.4060302@vanderbilt.edu>
Date: 2005-03-11T12:32:30Z
From: Frank E Harrell Jr
Subject: Logistic regression goodness of fit tests
In-Reply-To: <20050310154913.0d4b03e4.twiens@interbaun.com>
Trevor Wiens wrote:
> On Thu, 10 Mar 2005 16:19:41 -0600
> Frank E Harrell Jr <f.harrell at vanderbilt.edu> wrote:
>
>
>>The goodness of fit test only works on prespecified models. It is not
>>valid when stepwise variable selection is used (unless perhaps you use
>>alpha=0.5).
>>
>
>
> Perhaps I'm blind, but I can't find any reference to an alpha parameter on the help page for stepAIC. It runs fine however when I set the parameter and produces as model with the same right hand variables as without. Can you tell me what it is ?
>
> T
What I mean is the effective significance level for keeping a variable
in the model. Using AIC for one degree of freedom variables is
effectively using an alpha of 0.16 if I recall properly.
But I hope you got the point that resid(fit,'gof') as with most goodness
of fit tests assumes prespecified models.
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University