Hello STATA enthusiasts,
I have a dataset comprising numbers (observations) from 8 distinct variables. I aim to accomplish two objectives: first, to compute two scores, ST1 and ST2. ST1 represents the sum total of the best 4 scores from v1 to v6, while ST2 is the sum total of ST1, SP1, and SP2. Second, I intend to verify if the highest 4 scores used in ST1 are all above 95. The challenge lies in selectively summing the best 4 marks across the 6 variables and checking whether they are all above 95. How can I address this challenge?
I have a dataset comprising numbers (observations) from 8 distinct variables. I aim to accomplish two objectives: first, to compute two scores, ST1 and ST2. ST1 represents the sum total of the best 4 scores from v1 to v6, while ST2 is the sum total of ST1, SP1, and SP2. Second, I intend to verify if the highest 4 scores used in ST1 are all above 95. The challenge lies in selectively summing the best 4 marks across the 6 variables and checking whether they are all above 95. How can I address this challenge?
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str8 Centre_Code int(v1 v2 v3 v4 v5 v6 SP1 SP2) "100001" 102 103 107 103 107 101 109 106 "100001" 98 98 97 105 98 100 95 87 "100001" 96 97 98 101 101 94 98 93 "100001" 96 89 107 98 92 101 104 104 "100001" 100 98 107 102 94 103 100 101 "100001" 93 101 94 97 94 88 93 106 "100001" 122 116 123 121 130 112 115 111 "100001" 98 101 101 105 111 98 106 122 "100001" 106 98 101 106 108 105 109 111 "100001" 107 102 95 111 112 105 100 94 "100001" 99 100 102 88 97 89 93 94 "100001" 100 . 90 103 99 97 87 102 "100001" 97 101 96 95 81 99 89 101 "100001" 102 98 109 102 105 101 98 101 "100001" 112 106 108 112 108 106 101 99 "100001" 101 99 100 93 95 96 100 111 "100001" 121 113 115 120 103 106 132 114 "100001" 106 99 109 109 116 100 115 114 "100001" 109 105 95 101 101 99 107 93 "100001" 99 101 106 102 107 99 106 128 "100001" 109 106 107 109 106 108 107 111 "100003" 87 102 91 88 98 93 91 101 "100003" 110 107 110 110 117 106 116 104 "100003" 100 104 94 91 104 97 87 94 end
Comment