[R] Logistic regression goodness of fit tests

Frank E Harrell Jr f.harrell at vanderbilt.edu
Fri Mar 11 13:32:30 CET 2005


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




More information about the R-help mailing list