Displaying 1 result from an estimated 1 matches for "ques_valu".
Did you mean:
ques_value
2008 Jan 15
1
help with reshaping data into long format (correct question)
..._2 8 9 10 12 17 19 14 21 22 19
ques2_3 23 18 19 20 23 24 26 28 29 22
ques3_1 5 7 9 1 4 7 9 8 10 5
ques3_2 34 35 32 23 31 29 27 25 32 33
ques3_3 29 33 27 25 27 23 24 29 27 24
Now I want to reshape the data in a long format with target output
id disease age city sex treat ques ques_value
1 a 23 NY 1 n 1_1 2
1 a 23 NY 1 n 1_2 6
1 a 23 NY 1 n 1_3 17
1 a 23 NY 1 n 2_1 4
1 a 23 NY 1 n 2_2 8
1 a 23 NY 1 n 2_3 23
1 a 23 NY 1 n 3_1 5
1 a 23 NY 1 n 3_2 34
1 a 23 NY 1 n 3_3 29
2 b...