Hi,
Can some one tell me how do wew specify missing function in the class statement while running a logistic regression?
Thanks in advance !!
The message says
> 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 in the analysis data set.
You need to ensure that all possible levels in the scoring data set are also in the training data.
I suspect that the problem is that the score_file data has nonmissing levels that are not in train_new.
It's easy to check:
proc freq data=train_new;
tables &char;
run;
proc freq data=score_file;
tables &char;
run;
Do you mean that you want a missing value to be a valid group? If so, use the MISSING option, as stated in the documentation:
class C / missing;
Yes I am talking about the same I did try using that but still I am not geeting scores for all observations & I get this note:
proc logistic data = train_new desc plots(only)=roc;
class &char /missing ;
model Target = &final_vars &char/ pevent=.08 rsquare lackfit ;
score data = score_file out = predict_score_file ;
run;
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 in the analysis data set.
Can you help?
The message says
> 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 in the analysis data set.
You need to ensure that all possible levels in the scoring data set are also in the training data.
I suspect that the problem is that the score_file data has nonmissing levels that are not in train_new.
It's easy to check:
proc freq data=train_new;
tables &char;
run;
proc freq data=score_file;
tables &char;
run;
I'm not sure what you mean by "missing function" in this context. If you want to treat missing values of the class variables as valid levels for analysis the add / missing to the class statement after the variables.
CLASS var1 var2 var3 / missing;
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.
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.