I have a variable listed as follows:
Smoker: 1=never, 2=former, 3=current
How do I perform a two-sample t-test on a variable XX to examine the differences in former and current smokers (excluding those who never smoked from the analysis) in sas? I used the following code:
Data have;
set want;
proc sort;
by smoker;
run;
run;
proc ttest data=have alpha=0.05;
var XX;
class smoker;
run;
How do I make exclusions from the variable smoker?