Programming the statistical procedures from SAS

How to perform Hosmer and Lemeshow test on Validation test, Please Help

Reply
Frequent Contributor
Posts: 95

How to perform Hosmer and Lemeshow test on Validation test, Please Help

Hi,

I would like to perform the Hosmer and Lemeshow test on my Validation set. I have managed to use it on the training that I have used to build the model, but really I want to run it on the validation sample (out of sample) to see if my model generalizes well....This below was my process for the Training and Output results....But I would like to know how to apply it to validation once I have scored it using the model created on the training. Your help will be much appreciated. Thank you..

proc logistic data=Xsell_File DESCENDING plots(only)=roc;

class VAR1

      VAR2

      VAR3

      VAR4

      VAR5

;

model Click_Flag = VAR1

      VAR2

      VAR3

      VAR4

      VAR5

/ selection=stepwise lackfit;

SCORE DATA=Validation OUT=Validation_Scores (RENAME=(P_1=p));

run ;

Partition for the Hosmer and Lemeshow Test
Click_Flag = 1Click_Flag = 0
GroupTotalObservedExpectedObservedExpected
109,236588600.528,6488635.48
99,664494496.839,1709167.17
89,668472442.139,1969225.87
79,656402403.199,2549252.81
69,716392374.069,3249341.94
59,711327346.889,3849364.12
49,612303319.569,3099292.44
39,665316297.079,3499367.93
29,665267271.169,3989393.84
110,047232241.619,8159805.39
Hosmer and Lemeshow Goodness-of-Fit
Test
Chi-SquareDFPr > ChiSq
7.0880.5281
Ask a Question
Discussion stats
  • 0 replies
  • 148 views
  • 0 likes
  • 1 in conversation