You might want to acquaint yourself with the SASHELP data sets, which enable you to post examples that use real data that everyone can access. For example, see
SAS/STAT example data sets
SASHELP Data Sets
You should also bookmark the SAS/STAT documentation.
/* show variables for sashelp.heart */
proc contents data=sashelp.heart varnum; run;
/* show levels of categorical variables for sashelp.heart */
proc freq data=sashelp.heart;
tables sex BP_Status Chol_Status;
run;
ods select parameterestimates;
proc logistic data=sashelp.heart;
class BP_Status(ref="Normal")/param=ref;
class Chol_Status(ref="Desirable")/param=ref;
model Sex(event='Female') = BP_Status
Chol_Status Weight Diastolic*Chol_Status
;
output out=blah predicted=pred;
ods output parameterestimates = par_blah;
run;
ods select parameterestimates;
proc genmod data=sashelp.heart;
class BP_Status(ref="Normal")/param=ref;
class Chol_Status(ref="Desirable")/param=ref;
model Sex(event='Female') = BP_Status
Chol_Status Weight Diastolic*Chol_Status
/ dist=bin;
output out=blah2 predicted=pred;
ods output parameterestimates = par_blah2;
run;
/* compare predicted values to show they are approximately equal */
proc compare base=blah compare=blah2 method=absolute criterion=1e-8;
run;
... View more