Hi, I would like to seek some advice regarding proc tabulate. Using the heart dataset as an example, say that for whatever reason, I am interested in finding out the value of 2*mean of systolic of each group (systolic is a continuous variable) after classifying each row in the dataset according to 2 categorical columns (sex and weight_status). The codes below are wrong, but is there an elegant way to do such tabulation using proc tabulate? Or generally, is there a way to customise more complex computations using systolic, apart from computing its mean, median, min, max, etc. Thank you!
proc tabulate data=sashelp.heart;
class sex weight_status;
var systolic;
table sex, weight_status*systolic*(mean*2);
run;