I have an example data,like follows:
data patients;
input ID $ 1-4 Name $ 6-16 Sex $ 18 Age 20-21
Date 23-24 Height 26-27 Weight 29-31
ActLevel $ 33-36 Fee 38-43;
format fee 6.2;
datalines;
2458 Murray, W M 27 1 72 168 HIGH 85.20
2462 Almers, C F 34 3 66 152 HIGH 124.80
2523 Johnson, R F 43 31 63 137 MOD 149.75
2539 LaMance, K M 51 4 71 158 LOW 124.80
2544 Jones, M M 29 6 76 193 HIGH 124.80
2552 Reberson, P F 32 9 67 151 MOD 149.75
2555 King, E M 35 13 70 173 MOD 149.75
2563 Pitts, D M 34 22 73 154 LOW 124.80
2571 Nunnelly, A F 44 19 66 140 HIGH 149.75
2572 Oberon, M F 28 17 62 118 LOW 85.20
2574 Peterson, V M 30 6 69 147 MOD 149.75
2575 Quigley, M F 40 8 69 163 HIGH 124.80
2578 Cameron, L M 47 5 72 173 MOD 124.80
2586 Derber, B M 25 23 75 188 HIGH 85.20
2588 Ivan, H F 22 20 63 139 LOW 85.20
2589 Wilcox, E F 41 16 67 141 HIGH 149.75
2595 Warren, C M 54 7 71 183 MOD 149.75
;
run;
Then I create a two-dimensional table,like follows:
proc tabulate data=patients
style=[font_weight=bold];
class actlevel;
classlev actlevel / style=[just=left];
var age height weight / style=[font_size=3];
keyword all sum / style=[font_width=wide];
keylabel all="All Patients";
table (actlevel="Activity Level"
all*[style=[background=yellow]]),
(age height weight*f=best10.2)*mean /
style=[background=white]
misstext=[label="Missing"
style=[font_weight=light]]
box=[label="Patient Info by Activity Level"
style=[font_style=italic]];title 'Enhanced Table';
run;
The result is follows:
---------------------------------------------------------------------
|Patient Info by Activity Level| Age | Height | Weight |
| |------------+------------+----------|
| | Mean | Mean | Mean |
|------------------------------+------------+------------+----------|
|Activity Level | | | |
|------------------------------| | | |
|HIGH | 34.29| 70.14|163.571429|
|------------------------------+------------+------------+----------|
|LOW | 33.75| 67.25| 142.25|
|------------------------------+------------+------------+----------|
|MOD | 40.17| 68.67|160.666667|
|------------------------------+------------+------------+----------|
|All Patients | 36.24| 68.94|157.529412|
---------------------------------------------------------------------
I don't understand following two parts:
1) the value 'All Patients',how to calculate it? example how to get the result '36.24'?
2) (age height weight*f=best10.2)*mean / ,what is the meaning of 'weight*f=best10.2'? How to get the result '163.571429'?
Thanks
Message was edited by: EdwardKing