this simple question stumped after searching answers. have survey, , 1 of questions on survey asks methods of coping calamities, , gives room 3 answers. there 16 possible responses (answer codes), have labeled. i'm trying combine 3 columns in way 1 cut , paste responses column 2 , 3, right below column 1, in excel. tried reshaping, seems there has variable id goes along it. understand simple process, can't figure out how it.
i'm going assume have unique identifier patid; if don't you'll need create one;
gen t=1 gen patid=sum(t) works. need name 3 variables end in number e.g. v1 v2 v3. following should work:
preserve keep patid v1 v2 v3 reshape v,i(patid) tab v restore the preserve , restore mean whilst have printed required table have still got original database without reshape on it.
Comments
Post a Comment