HI,
I want to get a (Tertile) mean and STD of column(Weight) as
Example:
(Weight) Mean STD
1st tertile 77.23 5.2
2nd tertile 86.52 7.7
3rd tertile 101.82 6.8
Please post the accurate code/ method to complete further.
Thanks.
Use PROC RANK GROUPS=3 to add a variable with tertile scores to your data. Then just use PROC MEANS; CLASS tertile; VAR weight;
Please provide some example data for calculation.
My table consist of patient informations such as their test results, measurements etc...
from that I just want to calculate the tertile mean and std for the given columns in the table
like
Hope u understand now....
Weight | follw1_weight |
94.75 | 95.1 |
77.1 | 76.1 |
127 | 126.7 |
69.7 | 69.6 |
81.4 | 82.3 |
92.8 | 91 |
84.1 | 82.8 |
84.9 | 83 |
85.6 | 82.5 |
101.2 | 98.9 |
72.25 | 70.8 |
79.5 | 80.5 |
77 | 75.3 |
101.8 | 96.5 |
84 | 81.6 |
89.7 | 86 |
115.7 | 115.7 |
102.3 | 97.4 |
82.4 | 75.9 |
87.9 | 80.9 |
59.7 | 55 |
71.05 | 71.4 |
95.7 | 96 |
78.2 | 79.6 |
79.5 | 76.1 |
71.5 | 70.8 |
102 | 101.6 |
80 | 76.5 |
88.9 | 88.7 |
78.2 | 74.75 |
89.2 | 90 |
78.9 | 78.9 |
86.1 | 84.1 |
76.4 | 75 |
88.3 | 86 |
82.15 | 81.3 |
93.8 | 92.05 |
79.2 | 79.2 |
66 | 64.8 |
95.2 | 95.4 |
82.7 | 81.2 |
87.5 | 80.7 |
106.4 | 105.3 |
85.7 | 85.6 |
84.1 | 84.4 |
114.4 | 113.4 |
66.2 | 66.2 |
99.9 | 94.7 |
68.3 | 68 |
75.5 | 71.65 |
87 | 86.9 |
75.2 | 68.7 |
89.3 | 86.2 |
88 | 85.8 |
81.5 | 79.9 |
72.05 | 72.2 |
105.4 | 102.9 |
68.3 | 68.7 |
82.9 | 86.4 |
96.3 | 93.2 |
83.2 | 81.9 |
79.9 | 89.8 |
88.7 | 89.3 |
97.4 | 91.6 |
89.8 | 88 |
85 | 85.8 |
84.1 | 78.1 |
90 | 88.5 |
92.1 | 93.65 |
119.2 | 115.2 |
111.8 | 96 |
98.5 | 102.1 |
83.4 | 86.1 |
92.7 | 93.3 |
103.2 | 105.9 |
76.3 | 76.8 |
104.2 | 102.1 |
97.7 | 94.05 |
78.6 | 76.1 |
108 | 100.9 |
62.55 | 60.85 |
94 | 94 |
99.2 | 96.8 |
93.2 | 92.3 |
76.65 | 74.85 |
82.6 | 81.7 |
91.4 | 88.3 |
80.9 | 76.35 |
99.9 | 102 |
114 | 114.8 |
104.8 | 102.9 |
105.9 | 101.4 |
107.3 | 103.8 |
63.1 | 62.8 |
72.7 | 69 |
58.5 | 57.2 |
88.7 | 85.5 |
86.55 | 89.2 |
84.4 | 81 |
122.7 | 120.4 |
95.35 | 88.1 |
91.2 | 87.5 |
100 | 92.5 |
86.9 | 57.8 |
88 | 84.1 |
99.2 | 92.75 |
73.2 | 73.75 |
74.7 | 73.2 |
80.3 | 80.55 |
73.8 | 72.5 |
70.2 | 69.8 |
72.7 | 71.7 |
83.6 | 81.1 |
83.3 | 82 |
95.6 | 93.3 |
91.1 | 93 |
67.3 | 64.6 |
117.3 | 116.5 |
59.5 | 58 |
94.65 | 89.8 |
75 | 74.8 |
91.65 | 88.2 |
102.4 | 101.2 |
89.1 | 84.5 |
97.9 | 93.95 |
110.6 | 110.6 |
65.15 | 64.75 |
83.85 | 81.05 |
88.5 | 86.3 |
100.8 | 98 |
78.2 | 71.9 |
89.85 | 92.2 |
91.1 | 86.2 |
84.2 | 78.5 |
91.1 | 90.3 |
76.7 | 75.3 |
78.2 | 75.9 |
67.55 | 68 |
81.1 | 82.7 |
72.7 | 70.2 |
76.45 | 74 |
89.8 | 85.7 |
69.2 | 66.8 |
76.6 | 75.4 |
87.9 | 86.6 |
72.55 | 70.4 |
86.8 | 85.6 |
97 | 94.1 |
77.3 | 76.7 |
82.4 | 83.7 |
79.55 | 79.25 |
89.6 | 90 |
103.2 | 95.6 |
72.1 | 66.7 |
89.5 | 90.6 |
83.4 | 83.06 |
115.9 | 114.6 |
123.2 | 122.1 |
81.6 | 80.2 |
84.9 | 87.6 |
87.95 | 88.75 |
95.5 | 95.6 |
93.6 | 90.4 |
84.3 | 82.35 |
73.5 | 70.9 |
111.3 | 109 |
116.5 | 112.2 |
75.3 | 69.9 |
72.8 | 71.05 |
82.6 | 80.5 |
69.65 | 66.5 |
95.4 | 95.2 |
77.15 | 75.75 |
75.8 | 73.45 |
84.1 | 82.1 |
94 | 89.6 |
89.7 | 89.5 |
86.2 | 85 |
93.2 | 89.5 |
86.7 | 86.2 |
100.5 | 96.7 |
89.5 | 87.8 |
70.7 | 64.95 |
Use PROC RANK GROUPS=3 to add a variable with tertile scores to your data. Then just use PROC MEANS; CLASS tertile; VAR weight;
Note for future readers: This thread was continued there.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.