Hello there, I have a variable that is coded into two values, whereas in each one the label of that value has two different possible answers. I want to split this variable into four values (assigning the 50% of the original value to each of the new ones).
So, for example, if the original variable had values 1(with 10 obs) and 2(with 10 obs), I want to create a new variable with 4 values, each of them with 5 obs.
So, for example, if the original variable had values 1(with 10 obs) and 2(with 10 obs), I want to create a new variable with 4 values, each of them with 5 obs.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double p97_1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 1 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 end label values p97_1 P97_1 label def P97_1 1 "Dif�cil o pr�cticamente imposible", modify label def P97_1 2 "F�cil o muy f�cil", modify
Comment