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;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.