Hello, I have four variables which are supposedly measuring 4 dimensions of the same concept. I want to create an index in Stata. I have no idea what is the best way of doing it. The response scale is the same for all 5 and because it is an experimental data, only people in the third experimental group get to answer these questions. Thank you.
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line ------------------
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double(ener_sec4 ener_sec3 ener_sec2 ener_sec1) . . . . . . . . . . . . . . . . . . . . 5 4 2 2 5 4 3 3 5 5 4 4 . . . . . . . . 5 5 5 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 4 4 5 5 5 5 . . . . . . . . . . . . . . . . . . . . 2 5 2 1 5 5 4 4 end label values ener_sec4 P46_3_4 label def P46_3_4 1 "Sin importancia en absoluto", modify label def P46_3_4 2 "Algo sin importancia", modify label def P46_3_4 3 "Ni importante ni sin importancia", modify label def P46_3_4 4 "Algo importante", modify label def P46_3_4 5 "Extremadamente importante", modify label values ener_sec3 P46_3_3 label def P46_3_3 1 "Sin importancia en absoluto", modify label def P46_3_3 2 "Algo sin importancia", modify label def P46_3_3 3 "Ni importante ni sin importancia", modify label def P46_3_3 4 "Algo importante", modify label def P46_3_3 5 "Extremadamente importante", modify label values ener_sec2 P46_3_2 label def P46_3_2 1 "Sin importancia en absoluto", modify label def P46_3_2 2 "Algo sin importancia", modify label def P46_3_2 3 "Ni importante ni sin importancia", modify label def P46_3_2 4 "Algo importante", modify label def P46_3_2 5 "Extremadamente importante", modify label values ener_sec1 P46_3_1 label def P46_3_1 1 "Sin importancia en absoluto", modify label def P46_3_1 2 "Algo sin importancia", modify label def P46_3_1 3 "Ni importante ni sin importancia", modify label def P46_3_1 4 "Algo importante", modify label def P46_3_1 5 "Extremadamente importante", modify
Comment