I have 30 variables (ehp_1 through ehp_30) that correspond to survey questions - each variable is coded 0-4 on a Likert scale with 0 being "Never" and 4 being "Always." The variable is in byte format in Stata. I am attempting to create a composite score of the variable values. I attempted:
gen pain_score = ehp_1 + ehp_2 + ehp_3 + ehp_4 + ehp_5 + ehp_6 + ehp_7 + ehp_8 + ehp_9 + ehp_10 + ehp_11
gen control_score = ehp_12 + ehp_13 + ehp_14 + ehp_15 + ehp_16 + ehp_17
However, after testing the formula manually, the numbers generated above for pain_score and control_score ^ are not corrected. Any idea what to do here?
Thanks!
gen pain_score = ehp_1 + ehp_2 + ehp_3 + ehp_4 + ehp_5 + ehp_6 + ehp_7 + ehp_8 + ehp_9 + ehp_10 + ehp_11
gen control_score = ehp_12 + ehp_13 + ehp_14 + ehp_15 + ehp_16 + ehp_17
However, after testing the formula manually, the numbers generated above for pain_score and control_score ^ are not corrected. Any idea what to do here?
Thanks!
Comment