I am very new to Macros and I have a quick question.. How do I input in two variables in a macro?
%MACRO Table2adj (exp=);
PROC SURVEYLOGISTIC DATA =temp nomcar;
STRATA sdmvstra;
CLUSTER sdmvpsu;
WEIGHT MEC10YR;
DOMAIN sel;
CLASS &exp (REF='0') agegp (ref='3.30-39') martial (REF='4.never married') race (REF='1.NH White') edu (REF='HS') employ (REF='0')
income (REF='55+') healthstatus (REF='good') alcohol_abuse (REF='1.Low/No Risk') smoke (REF='0.never smoke') drug (REF='0');
MODEL haveins (event='1')= &exp agegp martial race edu employ income healthstatus Charlston_Score
/clparm vadjust=none;
run;
PROC SURVEYLOGISTIC DATA =temp nomcar;
STRATA sdmvstra;
CLUSTER sdmvpsu;
WEIGHT MEC10YR;
DOMAIN sel;
CLASS &exp (REF='0') agegp (ref='3.30-39') martial (REF='4.never married') race (REF='1.NH White') edu (REF='HS') employ (REF='0')
income (REF='55+') healthstatus (REF='good') alcohol_abuse (REF='1.Low/No Risk') smoke (REF='0.never smoke') drug (REF='0');
MODEL healthvisit (event='1')= &exp agegp martial race edu employ income healthstatus Charlston_Score
/clparm vadjust=none;
run;
%MEND Table2adj;
%Table2adj(exp=Male);
So the code above, I inserted the variable Male for &exp.. The two proc surveylogistic are identical with exception of the outcome. So I am wondering is there a way to insert Male and insert healthvisit? This is a simplified example, I have multiple procs to run.