Hi everyone,
Sorry if my question isn't clear. Below is an output I have created.
alc | Freq. Percent Cum.
------------+-----------------------------------
1 | 84 3.21 3.21
2 | 81 3.10 6.31
3 | 89 3.40 9.72
4 | 42 1.61 11.32
5 | 93 3.56 14.88
6 | 68 2.60 17.48
7 | 76 2.91 20.39
8 | 52 1.99 22.38
9 | 78 2.98 25.36
10 | 57 2.18 27.54
11 | 69 2.64 30.18
12 | 65 2.49 32.67
13 | 82 3.14 35.81
14 | 103 3.94 39.75
15 | 58 2.22 41.97
16 | 83 3.18 45.14
17 | 91 3.48 48.62
18 | 76 2.91 51.53
19 | 86 3.29 54.82
20 | 76 2.91 57.73
21 | 100 3.83 61.55
22 | 127 4.86 66.41
23 | 101 3.86 70.28
24 | 42 1.61 71.88
25 | 54 2.07 73.95
26 | 72 2.75 76.70
27 | 113 4.32 81.03
28 | 101 3.86 84.89
29 | 74 2.83 87.72
30 | 123 4.71 92.43
31 | 90 3.44 95.87
32 | 35 1.34 97.21
33 | 73 2.79 100.00
------------+-----------------------------------
Total | 2,614 100.00
I was wondering whether there was an easy code so that I could replace the values of alc with its corresponding percentage distribution. For example, the first would be 1 = 3.21, 2 = 3.10, 3 = 3.40, etc. Is there a command/code/function to be able to do this, or would I have to individually replace each value with its corresponding percentage individually?
Thank you.
Sorry if my question isn't clear. Below is an output I have created.
alc | Freq. Percent Cum.
------------+-----------------------------------
1 | 84 3.21 3.21
2 | 81 3.10 6.31
3 | 89 3.40 9.72
4 | 42 1.61 11.32
5 | 93 3.56 14.88
6 | 68 2.60 17.48
7 | 76 2.91 20.39
8 | 52 1.99 22.38
9 | 78 2.98 25.36
10 | 57 2.18 27.54
11 | 69 2.64 30.18
12 | 65 2.49 32.67
13 | 82 3.14 35.81
14 | 103 3.94 39.75
15 | 58 2.22 41.97
16 | 83 3.18 45.14
17 | 91 3.48 48.62
18 | 76 2.91 51.53
19 | 86 3.29 54.82
20 | 76 2.91 57.73
21 | 100 3.83 61.55
22 | 127 4.86 66.41
23 | 101 3.86 70.28
24 | 42 1.61 71.88
25 | 54 2.07 73.95
26 | 72 2.75 76.70
27 | 113 4.32 81.03
28 | 101 3.86 84.89
29 | 74 2.83 87.72
30 | 123 4.71 92.43
31 | 90 3.44 95.87
32 | 35 1.34 97.21
33 | 73 2.79 100.00
------------+-----------------------------------
Total | 2,614 100.00
I was wondering whether there was an easy code so that I could replace the values of alc with its corresponding percentage distribution. For example, the first would be 1 = 3.21, 2 = 3.10, 3 = 3.40, etc. Is there a command/code/function to be able to do this, or would I have to individually replace each value with its corresponding percentage individually?
Thank you.
Comment