I am trying to run a proc logistic regression. I have a lot of predictors which start with 'ST' and 'RF'. So I wrote the model statement like this
proc logistic data=x outest=y;
model binary_variable (event='1')= age sex RF: ST: lackfit;
output out=x p=fitted_prob predprob=individual ;
run;
I have fed this statement inside a macro and running this macro for multiple scenarios. I encountered few datasets where there was no column starting with ST, and the proc logistic threw an error, which goes like this
WARNING: No variables found beginning with 'ST' in data set
NOTE: The SAS System stopped processing this step because of errors.
If there a way to handle such exceptions? Some kind of parameter inside proc logistic? Thanks!