Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Goodness of fit

From   Mikkel Brabrand <>
To   "" <>
Subject   Re: st: Goodness of fit
Date   Wed, 4 May 2011 13:23:17 +0200

Thanks for the reply.

The thing is, that I am validating the score and thus not performing a new logistic regression (and then unable to use the postestimation commands). 

I have calculated a coefficient in the development cohort and am reusing this in the validation set. This is why I need to calculate goodness of fit by hand.


Den 03/05/2011 kl. 14.24 skrev Neil Shephard:

> On Tue, May 3, 2011 at 1:02 PM, mikkelbrabrand <> wrote:
>> I have developed a risk scoring system that I'm trying to validate. It was
>> originally developed in one cohort, and I am now validating it in a new,
>> independent, cohort. However, I am unsure how to test for goodness-of-fit
>> using Hosmer-Lemeshow's test.
>> First question: When validating my score, is it not correct that I should
>> use
>> the observed mortality (my endpoint) from the development cohort to estimate
>> the expected mortality in my validation cohort?
>> Second question: When calculating the Chi-square between the observed and
>> expected mortality, should my formula not be: (observed-expected)^2/
>> (expected*1-expected/N (in this stratum))?
>> Third question: How many degrees of freedome should I use? When I read the
>> book by Hosmer and Lemeshow (Applied logistic regression), in the section on
>> validation in an external cohort, I understand that the number of groups
>> equal the degrees of freedom, which in different from the ordinary method in
>> which the degrees of freedom is groups-2. Is this correct?
> You might want to check out -man logistic postestimation##estatgof-
> which implements the Hosmer-Lemeshow test (and permits you to specify
> the number of quantiles, and hence degrees of freedom).
> If you didn't know this existed you could have searched for it within
> Stata using -findit hosmer- and sifter through the results.
> Neil
> -- 
> “Truth in science can be defined as the working hypothesis best suited
> to open the way to the next better one.” - Konrad Lorenz
> Email -
> Website -
> Photos -
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index