Hi SAS Community, I am new to proc reports and would appreciate some guidance on my below need.
I have a data table:
data in;
input study $ subject device $ Yes_No Measure;
datalines;
A 1 a 1 348
A 1 a 0 1073
A 1 a 1 404
A 1 a 1 685
A 1 b 1 369
A 1 b 0 278
A 1 b 0 145
A 1 b 0 181
A 1 b 1 168
A 2 a 1 143
A 2 a 1 212
A 2 a 0 851
A 2 a 1 214
A 2 a 1 299
A 2 a 0 1201
A 2 b 0 406
A 2 b 0 124
A 2 b 1 953
A 2 b 0 169
A 2 b 0 783
A 3 a 1 153
A 3 a 1 151
A 3 a 0 217
A 3 a 0 313
A 3 a 0 864
A 4 b 1 5058
A 4 b 1 166
A 4 b 0 145
A 4 b 1 230
B 4 a 1 94
B 4 a 1 116
B 4 a 0 139
B 4 a 1 517
B 4 a 1 600
B 4 a 0 147
B 5 b 0 91
B 5 b 0 136
B 5 b 1 185
B 5 b 0 210
B 5 b 0 152
B 6 a 1 137
B 6 a 1 783
B 6 a 0 265
B 6 a 0 102
B 6 a 0 128
B 6 b 1 216
B 6 b 1 670
B 6 b 0 132
;
run;
The aim to compare the mean of measure across study. However, within each subject I first need calculate the mean of "measure" for each "device", and then use this to calculate the mean for each subject. This subject mean is then averaged across the study, and these are compared. How do I print this final computed average (average for study, accounting for subject and device) to a proc report? I also want to repeat this for a number of other variables (i.e. not just measure, but Yes_No, measure1, measure2, measure3, ...). Help would be great! Thankyou
... View more