I am trying to use a backwards selection process to create a parsimonious model using proc logistic.
when I attempt it my code is this:
proc logistic data=test2;
class stroke(ref="1") / param=ref;
model prevhyp (event="1")= stroke diabetes sysbp educ BMI diabp totchol glucose prevchd;
selection=stepwise;
slentry=0.05
slstay=0.20
details
lackfit;
run;
and my SAS log says this:
248 proc logistic data=test2;
249 class stroke(ref="1") / param=ref;
250 model prevhyp (event="1")= stroke diabetes sysbp educ BMI diabp totchol glucose prevchd;
251 selection=stepwise;
---------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
252 slentry=0.05
253 slstay=0.20
254 details
255 lackfit;
256 run;
I am not sure what I am doing wrong as I have never used the SLSTAY function before.
Off the top of my head, SELECTION= is an option on the MODEL statement. The line before should not end with a semicolon.
Instead, change it to a slash to indicate that MODEL statement options follow.
Yes, @Astounding is correct, you have a semicolon where you need a / to specify options instead.
model prevhyp (event="1") = stroke diabetes sysbp educ BMI diabp totchol glucose prevchd /selection=stepwise ... <rest of your options>;
@taylor_metz1 wrote:
I am trying to use a backwards selection process to create a parsimonious model using proc logistic.
when I attempt it my code is this:
proc logistic data=test2;
class stroke(ref="1") / param=ref;
model prevhyp (event="1")= stroke diabetes sysbp educ BMI diabp totchol glucose prevchd;
selection=stepwise;
slentry=0.05
slstay=0.20
details
lackfit;
run;
and my SAS log says this:
248 proc logistic data=test2;
249 class stroke(ref="1") / param=ref;
250 model prevhyp (event="1")= stroke diabetes sysbp educ BMI diabp totchol glucose prevchd;
251 selection=stepwise;
---------
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
252 slentry=0.05
253 slstay=0.20
254 details
255 lackfit;
256 run;
I am not sure what I am doing wrong as I have never used the SLSTAY function before.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.