BookmarkSubscribeRSS Feed
Lopa2016
Fluorite | Level 6

I have a variable age_band in my data & when I try to run a proc logistic using the same as a predictor it generates a note :

NOTE: Some observations in the WORK.score_file data set are not scored because they have class levels that are missing or are not present .

The variable values looks like this :

Age
18-29
30-39
40-49
50-59
 999
>=80

Following is the code that I have used:

proc logistic data = train_new desc plots(only)=roc;
class age /missing ;
model Target =  age/ pevent=.08 rsquare lackfit ;

score data = score_file out = predict_score_file ;
run;

Can some one help out in rectifying this? Thanks in advance!!

2 REPLIES 2
Reeza
Super User

 

 

  1. Check the distribution of your age variable across the test and modelling data. Note levels in one but not the other.
  2. How is your model developed/scored, is there a way to modify the data?

 

ballardw
Super User

In your previous post https://communities.sas.com/t5/SAS-Statistical-Procedures/Missing-option-in-class-statement-proc-log... Rick provided the answer: Your data does not match the SCORE data set. If you have combinations of variables that were not used in creating the SCORE data set then the score option does not know what to do with them at all.

 

Run Proc freq on the variable in both datasets and you will likely see that the number of levels does not match.

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1265 views
  • 0 likes
  • 3 in conversation