How to address the multiple response issue in the ODK data. Part 2
Visit my webpage: - http://beza.t.sileshi.unaux.com/
The STATA commands used in the video are listed in the list below. Please subscribe to my channel to receive more data management tips.
************************
use "C:\Users\Desktop\YouTube video\Data 2.dta", clear
*******************//*****************************
br
tab Q12 //You can substitute your multiple response variable for Q12.
************************************
split Q12
mrtab Q121 Q122 , sort title (What is the main source of cooking (coffee, tea,.. making?)) descending generate (q12)
egen byte v1 = diff( q121 q122 )
br v1 q121 q122
recode v1 (1=1 "Yes") (0=0 "No") , gen(Q12_1)
lab var Q12_1 "Tape water in the dwelling"
tab Q12_1
egen byte v2 = diff( q123 q124 )
recode v2 (1=1 "Yes") (0=0 "No") , gen(Q12_2)
lab var Q12_2 "Tap water outside dwelling (Jerrycan)"
recode q125 (1=1 "Yes") (0=0 "No") , gen(Q12_3)
lab var Q12_3 "Well water in the premises"
recode q126 (1=1 "Yes") (0=0 "No") , gen(Q12_4)
lab var Q12_4 "Bottled water"
recode q127 (1=1 "Yes") (0=0 "No") , gen(Q12_5)
lab var Q12_5 "Other source"
drop Q121 Q122 q121 q122 q123 q124 q125 q126 q127 v1 v2 //Housekeeping.
**********************************************