BookmarkSubscribeRSS Feed
Tariq519
Fluorite | Level 6

Good morning, I am currently creating an ordinal logistical model for my job and I am trying to diagnose the model to ensue that it fits the data. I am using the "lackfit" statement right after the model statement, however every time I run the code, the usual output is displayed, however no Hosmer and Lemeshow analysis is never displayed. I am currently using SAS 9.3 through SAS Enterprise 7.1. Here is my code below. 

 

proc logistic data=upper_limit;
class Profitrank dlr_zip RUCA2 area_description/ param= ref;
model profitrank = num_booked--percentage_of_new average_vehicle_age--average_truist_rate RUCA2 state_median_income--state_pop State_pop*RUCA2/lackfit rsq;
output out=new p=ppred;
run;

 

Would greatly appreciate any help!

4 REPLIES 4
PaigeMiller
Diamond | Level 26

For lack of fit to be computed, you have to have at least two observations with identical values across all x-variables. With so many x-variables, I think it is unlikely that you would have such observations. Have you checked your data set to see if you do have at least two observations with identical values?

--
Paige Miller
Tariq519
Fluorite | Level 6
I highly doubt that two of my observations have identical values. Is that really the only way you can utilize lackfit? Because I know the pearson dispersion test wouldn't work for this either since I have a lot of predictor variables a nd a relatively large data set.
PaigeMiller
Diamond | Level 26

@Tariq519 wrote:
I highly doubt that two of my observations have identical values

Me too.

 

Is that really the only way you can utilize lackfit?

 

Yes, that's what it needs to work.

--
Paige Miller
Ksharp
Super User
You will not get "lackfit" a.k.a Goodness Of Fitness Test , if there were more than 2 levels in Y variable (profitrank ) .

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 905 views
  • 0 likes
  • 3 in conversation