GMail (KU)
2010-Sep-01 15:57 UTC
[R] [Q] Goodness-of-fit test of a logistic regression model using rms package
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
Frank Harrell
2010-Sep-01 19:22 UTC
[R] [Q] Goodness-of-fit test of a logistic regression model using rms package
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 LeeYoung-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