BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
danteploy
Calcite | Level 5

I'm attempting to run the following piece of code, but getting the error that all observations have the same response.

 

proc logistic data=reg_sample descending

     plots(only)=roc(id=obs)

     outmodel=logit_model

     outest=logit_coeffs;

class tran_type occupation_desc SAR NRA SUB PCG;

model ESC_R = tran_type

     PCG

     cash_cr

     cash_cr_count

     cash_db

     cash_db_count

     risk_score

     days_first_to_last

     account_count

     trigger_count  

     avg_tran_amount

     branch_count

     whole_dollar_trans   

     round_10_trans

     round_100_trans

     round_1000_trans

     tenure    

     OCCUPATION_DESC

     prior_fps

     prior_escs

     prior_crips

     CTRs_filed

     international_db

     InCaT

     OutCaT    

     SAR 

     NRA 

     SUB/ selection=stepwise link=logit rsquare EXPB;

run;

 

I can see, from running Proc Freq, that the observations definitely have different responses.  Is there something else I need to change about my code?

ESC_R

Frequency

Percent

Cumulative
Frequency

Cumulative
Percent

0

9235

84.45

9235

84.45

1

1700

15.55

10935

100.00

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Did the log mention anything about how many observations may have been excluded?

Any record with any of the model variables missing is going to be excluded by default. So if all of the records that have all of those variables present only have the same value of the ESC_R variable that could happen.

 

As an almost complete guess I would be tempted to run proc freq on Incat*outcat.

The names of those variables make me suspect than a record may be unlikely to have an incat and outcat at the same time.

View solution in original post

2 REPLIES 2
ballardw
Super User

Did the log mention anything about how many observations may have been excluded?

Any record with any of the model variables missing is going to be excluded by default. So if all of the records that have all of those variables present only have the same value of the ESC_R variable that could happen.

 

As an almost complete guess I would be tempted to run proc freq on Incat*outcat.

The names of those variables make me suspect than a record may be unlikely to have an incat and outcat at the same time.

danteploy
Calcite | Level 5

The log didn't mention any excluded observations, but I went back in and filled in the missing values, and everything is working now.  Thanks!

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!

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
  • 2 replies
  • 1297 views
  • 2 likes
  • 2 in conversation