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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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