I do not think I am coding for the right proc; I am trying to find the correlation of females who smoke and have moderate to high cholesterol. I can not figure out how to Isolate the females from the males?
proc glm data=sashelp.heart;
class cholesterol;
model smoking = cholesterol;
run;
proc univariate data=sashelp.heart plots;
class chol_status;
var smoking ;
run;
proc univariate data=sashelp.heart plots;
class smoking_status;
var cholesterol ;
run;
proc reg data=sashelp.heart plots(maxpoints=10000);
model cholesterol = smoking;
run;quit;
I do not think I am coding for the right proc; I am trying to find the correlation of females who smoke and have moderate to high cholesterol. I can not figure out how to Isolate the females from the males?
proc glm data=sashelp.heart;
class cholesterol;
model smoking = cholesterol;
run;
proc univariate data=sashelp.heart plots;
class chol_status;
var smoking ;
run;
proc univariate data=sashelp.heart plots;
class smoking_status;
var cholesterol ;
run;
proc reg data=sashelp.heart plots(maxpoints=10000);
model cholesterol = smoking;
run;quit;
proc glm data=sashelp.heart;
class cholesterol;
model smoking = cholesterol;
where sex = 'Female';
run;
proc univariate data=sashelp.heart plots;
class chol_status;
var smoking ;
where sex = 'Female';
run;
proc univariate data=sashelp.heart plots;
class smoking_status;
var cholesterol ;
where sex = 'Female';
run;
proc reg data=sashelp.heart plots(maxpoints=10000);
model cholesterol = smoking;
Where sex = 'Female';
run;quit;
add where sex = 'Female':
Try adding where sex = 'Female';
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.