# Validation of logistic regression - goodness of fit (pearson)

I have developed a scoring system using logistic regression. The score ranges between 0 and 6 (using integers) and predicts death. It does not use a conventional regression formula and thus I am not able to calculate a precise value of the predicted risk of dying. An example of the score could look like this:

0            0      101
1            1      911
2            3      672
3            2      291
4            8      78
5            10     60
6            5      4

I know that I have to use Pearson's goodness of fit to test the goodness-of-fit and have three cohorts, a development cohort and two independent validation cohorts.

My question is: How do I calculate the Pearson Goodness-of-fit test in each cohort? In the development cohort, what would be my expected mortality? In the validation cohorts, I guess that I could use the observed mortality in the development cohort as expected mortality.

That test has been shown to be arbitrary and not have competitive power in some situations. I prefer directed tests (e.g., nonlinearity) but if you want an omnibus test see the following, as implemented in the R rms package's residuals.lrm function: Hosmer, D. W.; Hosmer, T.; le Cessie, S. & Lemeshow, S. A comparison of goodness-of-fit tests for the logistic regression model Statistics in Medicine, 1997, 16, 965-980 –  Frank Harrell Aug 31 '12 at 16:43