options nocenter; goptions reset=global colors=(none); data problem81; infile 'i:\.www\datasets502\EX0502.DAT' firstobs=2 dlm='09'x; input person sbp quet age smk; if smk = 0 then smk1 = -1; if smk = 1 then smk1 = 1; proc sort; by smk; proc ttest; var sbp; class smk; proc reg; model sbp = smk; model sbp = smk1; data problem3; infile 'i:\.www\datasets502\EX1403.DAT' firstobs=2 dlm='09'x; input country $ x y; if country = "RICH" then z=0; if country = "POOR" then z=1; x_z = x*z; proc sort; by z; symbol1 v=circle i=rl; symbol2 v=square i=rl line=2; proc gplot; plot y*x = z; proc reg; model y = x; by z; proc reg; model y = x z x_z / ss1; run; quit;