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';
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.