BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
aranganayagi
Obsidian | Level 7
Hi, what is the ideal Pvalue which tells the model is in good fit in H-L Goodness fit test. My understanding is lower the pr>chi sq, better the model. How low it should be.
1 ACCEPTED SOLUTION

Accepted Solutions
aranganayagi
Obsidian | Level 7
In other places, lesser p value means higher significance. Why in H-L test alone, higher p value indicates better model. Can you please help to understand.

View solution in original post

7 REPLIES 7
PGStats
Opal | Level 21

Note: the test is called Hosmer-Lemeshow.

 

It's the other way around. Read the doc.

 

Large values of [Chisquare] (and small p-values) indicate a lack of fit of the model.

 

i.e. p-values  greater than 0.05 indicate that the test doesn't detect a signigficant lack of fit.

PG
aranganayagi
Obsidian | Level 7
Thanks PG stats. So Pvalue > 0.05 indicates good fit of model?
Ksharp
Super User

Yes. The bigger Pvalue , the better your model .

 

 

i.e.

H0 : model fit data well 

P=0.9 stand for your model fit the train data very well .( H0 is true )

 

BTW, if you have big table, H-L is not good test due to it will always refuse H0,

under this scenario you could try GOF option in MODEL statement.

or @Rick_SAS  blog plot the predicted / real Y by proc sgplot .

https://blogs.sas.com/content/iml/2019/02/20/easier-calibration-plot-sas.html

https://blogs.sas.com/content/iml/2018/05/14/calibration-plots-in-sas.html

aranganayagi
Obsidian | Level 7
In other places, lesser p value means higher significance. Why in H-L test alone, higher p value indicates better model. Can you please help to understand.
Ksharp
Super User

Did you see my H0 hypethesis ?

 

P<0.05 stand for refusjing H0 , the higher P value the more close to H0 .

aranganayagi
Obsidian | Level 7
Yes... I understood now. Thanks for explaining. While parameter estimation, p should be lesser, lesser p means it rejects null hypothesis. Whereas here in goodness fit test, h0 is hypothesis built by the model and p should be larger to say that built h0 is true.
Ksharp
Super User

Yeah. You nailed it .

For " parameter estimation" , the H0 is  the parameter coefficient = 0 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 1033 views
  • 3 likes
  • 3 in conversation