1) Exploring the statistics involved in weight related health issues. With the below lines of code, I wanted to figure out what is the range of weight for the considered population and whether they are satisfied with their weight or not. Out of all, what is the percentage and frequency of people consuming diet pills and laxatives.
Below is an overview values taken by various variables:
H1GH60:
range betweenn 50 to 360 pounds
996: refused
998: don't know
999: not applicable
H1GH28:
1: very underweight
2: slightly underweight
3: about the right weight
4: slightly overweight
5: very overweight
6: refused
8: don't know
H1GH29 takes values like loose weight, gain weigt, stay the same weight etc
H1GH30D and H1GH30E take values likes marked, not marked, refused, legitimate skip etc
LIBNAME mydata
"/courses/d1406ae5ba27fe300" access=readonly;
DATA new; set
mydata.addhealth_pds;
LABEL H1GH60="Weight of
population"
H1GH28="Weight satisfaction"
H1GH29="Willing to change"
H1GH30D="Diet pills consumption"
H1GH30E="Laxatives consumption";
PROC SORT; by AID;
PROC FREQ; TABLES h1gh24
h1gh28 h1gh29 h1gh30d h1gh30e;
RUN;
Below is an overview values taken by various variables:
H1GH60:
range betweenn 50 to 360 pounds
996: refused
998: don't know
999: not applicable
H1GH28:
1: very underweight
2: slightly underweight
3: about the right weight
4: slightly overweight
5: very overweight
6: refused
8: don't know
H1GH29 takes values like loose weight, gain weigt, stay the same weight etc
H1GH30D and H1GH30E take values likes marked, not marked, refused, legitimate skip etc
2) Frequency distribution table:
SAS Logs:
The FREQ Procedure
| Weight of population | ||||
|---|---|---|---|---|
| H1GH60 | Frequency | Percent | Cumulative Frequency | Cumulative Percent |
| 50 | 1 | 0.02 | 1 | 0.02 |
| 57 | 1 | 0.02 | 2 | 0.03 |
| 62 | 2 | 0.03 | 4 | 0.06 |
| 67 | 2 | 0.03 | 6 | 0.09 |
| 70 | 4 | 0.06 | 10 | 0.15 |
| 71 | 1 | 0.02 | 11 | 0.17 |
| 73 | 1 | 0.02 | 12 | 0.18 |
| 74 | 2 | 0.03 | 14 | 0.22 |
| 75 | 14 | 0.22 | 28 | 0.43 |
| 76 | 1 | 0.02 | 29 | 0.45 |
| 78 | 4 | 0.06 | 33 | 0.51 |
| 79 | 2 | 0.03 | 35 | 0.54 |
| 80 | 15 | 0.23 | 50 | 0.77 |
| 81 | 2 | 0.03 | 52 | 0.80 |
| 82 | 13 | 0.20 | 65 | 1.00 |
| 83 | 3 | 0.05 | 68 | 1.05 |
| 84 | 2 | 0.03 | 70 | 1.08 |
| 85 | 24 | 0.37 | 94 | 1.45 |
| 86 | 5 | 0.08 | 99 | 1.52 |
| 87 | 8 | 0.12 | 107 | 1.65 |
| 88 | 7 | 0.11 | 114 | 1.75 |
| 89 | 10 | 0.15 | 124 | 1.91 |
| 90 | 34 | 0.52 | 158 | 2.43 |
| 91 | 7 | 0.11 | 165 | 2.54 |
| 92 | 21 | 0.32 | 186 | 2.86 |
| 93 | 14 | 0.22 | 200 | 3.08 |
| 94 | 15 | 0.23 | 215 | 3.31 |
| 95 | 63 | 0.97 | 278 | 4.27 |
| 96 | 26 | 0.40 | 304 | 4.67 |
| 97 | 22 | 0.34 | 326 | 5.01 |
| 98 | 61 | 0.94 | 387 | 5.95 |
| 99 | 15 | 0.23 | 402 | 6.18 |
| 100 | 115 | 1.77 | 517 | 7.95 |
| 101 | 21 | 0.32 | 538 | 8.27 |
| 102 | 36 | 0.55 | 574 | 8.83 |
| 103 | 32 | 0.49 | 606 | 9.32 |
| 104 | 13 | 0.20 | 619 | 9.52 |
| 105 | 145 | 2.23 | 764 | 11.75 |
| 106 | 24 | 0.37 | 788 | 12.12 |
| 107 | 36 | 0.55 | 824 | 12.67 |
| 108 | 39 | 0.60 | 863 | 13.27 |
| 109 | 14 | 0.22 | 877 | 13.48 |
| 110 | 228 | 3.51 | 1105 | 16.99 |
| 111 | 23 | 0.35 | 1128 | 17.34 |
| 112 | 60 | 0.92 | 1188 | 18.27 |
| 113 | 36 | 0.55 | 1224 | 18.82 |
| 114 | 43 | 0.66 | 1267 | 19.48 |
| 115 | 247 | 3.80 | 1514 | 23.28 |
| 116 | 31 | 0.48 | 1545 | 23.75 |
| 117 | 41 | 0.63 | 1586 | 24.38 |
| 118 | 62 | 0.95 | 1648 | 25.34 |
| 119 | 31 | 0.48 | 1679 | 25.81 |
| 120 | 342 | 5.26 | 2021 | 31.07 |
| 121 | 20 | 0.31 | 2041 | 31.38 |
| 122 | 28 | 0.43 | 2069 | 31.81 |
| 123 | 41 | 0.63 | 2110 | 32.44 |
| 124 | 32 | 0.49 | 2142 | 32.93 |
| 125 | 238 | 3.66 | 2380 | 36.59 |
| 126 | 29 | 0.45 | 2409 | 37.04 |
| 127 | 32 | 0.49 | 2441 | 37.53 |
| 128 | 42 | 0.65 | 2483 | 38.18 |
| 129 | 17 | 0.26 | 2500 | 38.44 |
| 130 | 342 | 5.26 | 2842 | 43.70 |
| 131 | 17 | 0.26 | 2859 | 43.96 |
| 132 | 36 | 0.55 | 2895 | 44.51 |
| 133 | 21 | 0.32 | 2916 | 44.83 |
| 134 | 34 | 0.52 | 2950 | 45.36 |
| 135 | 308 | 4.74 | 3258 | 50.09 |
| 136 | 36 | 0.55 | 3294 | 50.65 |
| 137 | 33 | 0.51 | 3327 | 51.15 |
| 138 | 39 | 0.60 | 3366 | 51.75 |
| 139 | 16 | 0.25 | 3382 | 52.00 |
| 140 | 331 | 5.09 | 3713 | 57.09 |
| 141 | 9 | 0.14 | 3722 | 57.23 |
| 142 | 37 | 0.57 | 3759 | 57.80 |
| 143 | 28 | 0.43 | 3787 | 58.23 |
| 144 | 15 | 0.23 | 3802 | 58.46 |
| 145 | 224 | 3.44 | 4026 | 61.90 |
| 146 | 20 | 0.31 | 4046 | 62.21 |
| 147 | 34 | 0.52 | 4080 | 62.73 |
| 148 | 40 | 0.62 | 4120 | 63.35 |
| 149 | 16 | 0.25 | 4136 | 63.59 |
| 150 | 296 | 4.55 | 4432 | 68.14 |
| 151 | 11 | 0.17 | 4443 | 68.31 |
| 152 | 30 | 0.46 | 4473 | 68.77 |
| 153 | 18 | 0.28 | 4491 | 69.05 |
| 154 | 16 | 0.25 | 4507 | 69.30 |
| 155 | 173 | 2.66 | 4680 | 71.96 |
| 156 | 20 | 0.31 | 4700 | 72.26 |
| 157 | 14 | 0.22 | 4714 | 72.48 |
| 158 | 26 | 0.40 | 4740 | 72.88 |
| 159 | 12 | 0.18 | 4752 | 73.06 |
| 160 | 220 | 3.38 | 4972 | 76.45 |
| 161 | 6 | 0.09 | 4978 | 76.54 |
| 162 | 14 | 0.22 | 4992 | 76.75 |
| 163 | 10 | 0.15 | 5002 | 76.91 |
| 164 | 7 | 0.11 | 5009 | 77.01 |
| 165 | 140 | 2.15 | 5149 | 79.17 |
| 166 | 3 | 0.05 | 5152 | 79.21 |
| 167 | 14 | 0.22 | 5166 | 79.43 |
| 168 | 26 | 0.40 | 5192 | 79.83 |
| 169 | 6 | 0.09 | 5198 | 79.92 |
| 170 | 126 | 1.94 | 5324 | 81.86 |
| 171 | 4 | 0.06 | 5328 | 81.92 |
| 172 | 25 | 0.38 | 5353 | 82.30 |
| 173 | 9 | 0.14 | 5362 | 82.44 |
| 174 | 8 | 0.12 | 5370 | 82.56 |
| 175 | 115 | 1.77 | 5485 | 84.33 |
| 176 | 12 | 0.18 | 5497 | 84.52 |
| 177 | 1 | 0.02 | 5498 | 84.53 |
| 178 | 17 | 0.26 | 5515 | 84.79 |
| 179 | 9 | 0.14 | 5524 | 84.93 |
| 180 | 120 | 1.85 | 5644 | 86.78 |
| 181 | 3 | 0.05 | 5647 | 86.82 |
| 182 | 12 | 0.18 | 5659 | 87.01 |
| 183 | 7 | 0.11 | 5666 | 87.12 |
| 184 | 7 | 0.11 | 5673 | 87.22 |
| 185 | 90 | 1.38 | 5763 | 88.61 |
| 186 | 6 | 0.09 | 5769 | 88.70 |
| 187 | 7 | 0.11 | 5776 | 88.81 |
| 188 | 3 | 0.05 | 5779 | 88.85 |
| 189 | 8 | 0.12 | 5787 | 88.98 |
| 190 | 73 | 1.12 | 5860 | 90.10 |
| 191 | 1 | 0.02 | 5861 | 90.11 |
| 192 | 9 | 0.14 | 5870 | 90.25 |
| 193 | 5 | 0.08 | 5875 | 90.33 |
| 194 | 4 | 0.06 | 5879 | 90.39 |
| 195 | 43 | 0.66 | 5922 | 91.05 |
| 196 | 4 | 0.06 | 5926 | 91.11 |
| 197 | 6 | 0.09 | 5932 | 91.21 |
| 198 | 13 | 0.20 | 5945 | 91.41 |
| 199 | 2 | 0.03 | 5947 | 91.44 |
| 200 | 72 | 1.11 | 6019 | 92.54 |
| 201 | 1 | 0.02 | 6020 | 92.56 |
| 202 | 1 | 0.02 | 6021 | 92.57 |
| 203 | 4 | 0.06 | 6025 | 92.64 |
| 204 | 4 | 0.06 | 6029 | 92.70 |
| 205 | 17 | 0.26 | 6046 | 92.96 |
| 206 | 2 | 0.03 | 6048 | 92.99 |
| 207 | 1 | 0.02 | 6049 | 93.00 |
| 208 | 5 | 0.08 | 6054 | 93.08 |
| 209 | 2 | 0.03 | 6056 | 93.11 |
| 210 | 47 | 0.72 | 6103 | 93.83 |
| 212 | 3 | 0.05 | 6106 | 93.88 |
| 213 | 1 | 0.02 | 6107 | 93.90 |
| 214 | 2 | 0.03 | 6109 | 93.93 |
| 215 | 22 | 0.34 | 6131 | 94.27 |
| 216 | 2 | 0.03 | 6133 | 94.30 |
| 217 | 2 | 0.03 | 6135 | 94.33 |
| 218 | 2 | 0.03 | 6137 | 94.36 |
| 219 | 2 | 0.03 | 6139 | 94.39 |
| 220 | 41 | 0.63 | 6180 | 95.02 |
| 222 | 3 | 0.05 | 6183 | 95.06 |
| 225 | 20 | 0.31 | 6203 | 95.37 |
| 228 | 4 | 0.06 | 6207 | 95.43 |
| 229 | 1 | 0.02 | 6208 | 95.45 |
| 230 | 13 | 0.20 | 6221 | 95.65 |
| 231 | 1 | 0.02 | 6222 | 95.66 |
| 232 | 3 | 0.05 | 6225 | 95.71 |
| 235 | 11 | 0.17 | 6236 | 95.88 |
| 236 | 1 | 0.02 | 6237 | 95.89 |
| 237 | 2 | 0.03 | 6239 | 95.93 |
| 238 | 1 | 0.02 | 6240 | 95.94 |
| 240 | 14 | 0.22 | 6254 | 96.16 |
| 241 | 1 | 0.02 | 6255 | 96.17 |
| 242 | 3 | 0.05 | 6258 | 96.22 |
| 243 | 1 | 0.02 | 6259 | 96.23 |
| 245 | 10 | 0.15 | 6269 | 96.39 |
| 247 | 1 | 0.02 | 6270 | 96.40 |
| 248 | 2 | 0.03 | 6272 | 96.43 |
| 250 | 25 | 0.38 | 6297 | 96.82 |
| 252 | 1 | 0.02 | 6298 | 96.83 |
| 255 | 1 | 0.02 | 6299 | 96.85 |
| 256 | 1 | 0.02 | 6300 | 96.86 |
| 260 | 8 | 0.12 | 6308 | 96.99 |
| 265 | 6 | 0.09 | 6314 | 97.08 |
| 270 | 6 | 0.09 | 6320 | 97.17 |
| 276 | 1 | 0.02 | 6321 | 97.19 |
| 280 | 6 | 0.09 | 6327 | 97.28 |
| 285 | 2 | 0.03 | 6329 | 97.31 |
| 287 | 1 | 0.02 | 6330 | 97.32 |
| 290 | 5 | 0.08 | 6335 | 97.40 |
| 291 | 1 | 0.02 | 6336 | 97.42 |
| 295 | 1 | 0.02 | 6337 | 97.43 |
| 300 | 4 | 0.06 | 6341 | 97.49 |
| 305 | 2 | 0.03 | 6343 | 97.52 |
| 320 | 1 | 0.02 | 6344 | 97.54 |
| 323 | 1 | 0.02 | 6345 | 97.56 |
| 324 | 1 | 0.02 | 6346 | 97.57 |
| 336 | 1 | 0.02 | 6347 | 97.59 |
| 360 | 1 | 0.02 | 6348 | 97.60 |
| 996 | 32 | 0.49 | 6380 | 98.09 |
| 998 | 121 | 1.86 | 6501 | 99.95 |
| 999 | 3 | 0.05 | 6504 | 100.00 |
| Weight satisfaction | ||||
|---|---|---|---|---|
| H1GH28 | Frequency | Percent | Cumulative Frequency | Cumulative Percent |
| 1 | 128 | 1.97 | 128 | 1.97 |
| 2 | 935 | 14.38 | 1063 | 16.34 |
| 3 | 3381 | 51.98 | 4444 | 68.33 |
| 4 | 1808 | 27.80 | 6252 | 96.13 |
| 5 | 238 | 3.66 | 6490 | 99.78 |
| 6 | 4 | 0.06 | 6494 | 99.85 |
| 8 | 10 | 0.15 | 6504 | 100.00 |
| Willing to change | ||||
|---|---|---|---|---|
| H1GH29 | Frequency | Percent | Cumulative Frequency | Cumulative Percent |
| 1 | 2230 | 34.29 | 2230 | 34.29 |
| 2 | 1235 | 18.99 | 3465 | 53.27 |
| 3 | 2228 | 34.26 | 5693 | 87.53 |
| 4 | 802 | 12.33 | 6495 | 99.86 |
| 6 | 4 | 0.06 | 6499 | 99.92 |
| 8 | 5 | 0.08 | 6504 | 100.00 |
| Diet pills consumption | ||||
|---|---|---|---|---|
| H1GH30D | Frequency | Percent | Cumulative Frequency | Cumulative Percent |
| 0 | 4415 | 67.88 | 4415 | 67.88 |
| 1 | 43 | 0.66 | 4458 | 68.54 |
| 6 | 4 | 0.06 | 4462 | 68.60 |
| 7 | 2037 | 31.32 | 6499 | 99.92 |
| 8 | 5 | 0.08 | 6504 | 100.00 |
| Laxatives consumption | ||||
|---|---|---|---|---|
| H1GH30E | Frequency | Percent | Cumulative Frequency | Cumulative Percent |
| 0 | 4446 | 68.36 | 4446 | 68.36 |
| 1 | 12 | 0.18 | 4458 | 68.54 |
| 6 | 4 | 0.06 | 4462 | 68.60 |
| 7 | 2037 | 31.32 | 6499 | 99.92 |
| 8 | 5 | 0.08 | 6504 | 100.00 |
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;5556 LIBNAME mydata "/courses/d1406ae5ba27fe300" access=readonly;NOTE: Libref MYDATA was successfully assigned as follows:Engine: V9Physical Name: /courses/d1406ae5ba27fe30057 DATA new; set mydata.addhealth_pds;NOTE: Data file MYDATA.ADDHEALTH_PDS.DATA is in a format that is native to another host, or the file encoding does not match thesession encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduceperformance.58 LABEL H1GH60="Weight of population"59 H1GH28="Weight satisfaction"60 H1GH29="Willing to change"61 H1GH30D="Diet pills consumption"62 H1GH30E="Laxatives consumption";NOTE: There were 6504 observations read from the data set MYDATA.ADDHEALTH_PDS.NOTE: The data set WORK.NEW has 6504 observations and 2829 variables.NOTE: DATA statement used (Total process time):real time 7.30 secondsuser cpu time 1.26 secondssystem cpu time 0.15 secondsmemory 5212.53kOS Memory 35588.00kTimestamp 12/18/2015 06:33:32 AMStep Count 18 Switch Count 52Page Faults 0Page Reclaims 1413Page Swaps 0Voluntary Context Switches 199Involuntary Context Switches 1Block Input Operations 8Block Output Operations 33408863 PROC SORT; by AID;NOTE: There were 6504 observations read from the data set WORK.NEW.NOTE: The data set WORK.NEW has 6504 observations and 2829 variables.NOTE: PROCEDURE SORT used (Total process time):real time 6.47 secondsuser cpu time 0.03 secondssystem cpu time 0.25 secondsmemory 173958.62kOS Memory 203904.00kTimestamp 12/18/2015 06:33:39 AMStep Count 19 Switch Count 24Page Faults 0Page Reclaims 37154Page Swaps 0Voluntary Context Switches 87Involuntary Context Switches 2Block Input Operations 8Block Output Operations 33408864 PROC FREQ; TABLES h1gh60 h1gh28 h1gh29 h1gh30d h1gh30e;65 RUN;NOTE: There were 6504 observations read from the data set WORK.NEW.NOTE: PROCEDURE FREQ used (Total process time):real time 0.29 secondsuser cpu time 0.27 secondssystem cpu time 0.03 secondsmemory 6203.56kOS Memory 36268.00kTimestamp 12/18/2015 06:33:39 AMStep Count 20 Switch Count 28Page Faults 0Page Reclaims 698Page Swaps 0Voluntary Context Switches 62Involuntary Context Switches 1Block Input Operations 0Block Output Operations 3766667 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;79
No comments:
Post a Comment