I would like to reshape into long while assigning the value in the var. institution to each obs/id. The data example should then become 4 obs. long.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int id str24 institution str17 var1a str36 var2a str17 var1b str36 var2b 43 "hus 1" "1 kvinde" "Bil" "1 kvinde" "Bil" 44 "hus 2" "1 mand" "Bil" "1 kvinde" "Bil" end
Best regards
Lars
If above is unclear it is this data structure I aim for:
id | institution | var1 | var | |
43-1 | hus1 | 1 kvinde | Bil | |
43-2 | hus1 | 1 kvinde | Bil | |
44-1 | hus2 | 1 mand | Bil | |
44-2 | hus2 | 1 kvinde | Bil | |
0 Response to reshape - wide connections
Post a Comment