I'm dealing with some data from a conjoint experiment. Currently, it is in wide format (each row an individual), and I'd like to get it into long format. Here is some dummy data from the current wide format:
Code:
clear input id govA_c1_1 govA_c1_2 govB_c1_1 govB_c1_2 choice_1 choice_2 1 1 2 1 2 1 2 2 2 1 2 1 2 1 3 2 2 1 1 2 1 4 2 1 2 1 1 2 end
I'd like to get this into a format such that each row identifies each contest/government/respondent combination. The row 'c1' shows characteristic 1 value for governments 1/2 at each contest. Choice indicates whether respondent chose that government in that contest.
Code:
clear input id contest no. c1 choice 1 1 1 1 1 1 1 0 1 2 2 0 1 2 2 1 2 1 2 0 2 1 1 1 2 2 2 0 2 2 1 1 end
I hope this makes sense and I haven't made a mistake up to this point.
Thanks!
0 Response to Reshape help
Post a Comment