[R] [Q] Goodness-of-fit test of a logistic regression model using rms package
Frank Harrell
f.harrell at vanderbilt.edu
Wed Sep 1 21:22:28 CEST 2010
On Wed, 1 Sep 2010, GMail (KU) wrote:
> Hello,
>
> I was looking for a way to evaluate the goodness-of-fit of a logistic regression model. After googling, I found that I could use "resid(fit, 'gof')" method implemented in the rms package. However, since I am not used to the "le Cessie-van Houwelingen normal test statistic," I do not know which statistic from the returned from the "resid(fit, 'gof')" call that I could use to evaluate the goodness of fit.
>
> When I ran the "resid(fit, 'gof')", I got the following results:
> ##############################################
> Sum of squared errors Expected value|H0 SD
> 6844.684594 6805.672315 2.790969
> Z P
> 13.978043 0.000000
> ##############################################
>
> I tried to read the le Cessie and van Houwelingen's original paper, but I found that it required prerequisite knowledge I don't current have.
> Could someone explain how to interpret the results from "resid(fit, 'gof') call?
>
> Any help would be much appreciated.
>
> Young-Jin Lee
Young-Jin,
I think everyone has trouble interpreting omnibus tests of lack of
fit, so don't feel bad. You just know that something somewhere is
probably wrong with the model. I focus on directed tests such as
allowing all continuous variables to have nonlinear effects or
allowing selected interactions, and finding out how important the
complex model terms are.
Frank Harrell
More information about the R-help
mailing list