Hi everyone,
I am in the process of coding panel data. I have reshaped my data to be long (from wide), so there are 16 rows corresponding to each respondent (4 choice experiments were presented to each respondent with 4 options each). If you see my data in the picture below, you will see the column "CE", which represents which of the 4 options they selected on each choice experiment. I.e., respondent 1 chose option 2 for the first choice experiment and option 3 for the other 3 choice experiments. This is what I need help with -- how do I recode the "CE" variable so that their choice is repeated 4 times for the corresponding question. I.e., respondent 1's CE column would look like 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3. In other words, I want the option they chose for the corresponding question to be repeated four times, aligning next to the same question number. I hope that makes sense.
Thanks for help.
I am in the process of coding panel data. I have reshaped my data to be long (from wide), so there are 16 rows corresponding to each respondent (4 choice experiments were presented to each respondent with 4 options each). If you see my data in the picture below, you will see the column "CE", which represents which of the 4 options they selected on each choice experiment. I.e., respondent 1 chose option 2 for the first choice experiment and option 3 for the other 3 choice experiments. This is what I need help with -- how do I recode the "CE" variable so that their choice is repeated 4 times for the corresponding question. I.e., respondent 1's CE column would look like 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3. In other words, I want the option they chose for the corresponding question to be repeated four times, aligning next to the same question number. I hope that makes sense.
Thanks for help.
Comment