* Stata program to construct a separate file of the persons with disabilities * Specify a workspace cd e:\DHS\DHS_data\scratch * Open the HR file use hv001 hv002 sh33* using "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\IAHR7EFL.DTA" , clear describe sh33* * These four variables are line numbers, to be converted to hvidx tab1 sh33a sh33b sh33c sh33d,m * Rename the other variables for easier manipulation * replace sh33 with dis * drop the 1 * reverse the two letters * Replace character 5 (a,b,c,d) with 1,2,3,4, for matching with line number * replace the last character (a,b,c,d,e,x) with H, S, V, M, L, O * H for Hearing, S for Speech, V for Visual, M for Mental, * L for Locomotor, O for Other. All of these are coded 0 for no and 1 for yes drop if sh33a==. rename sh33a hvidx1 rename sh33b hvidx2 rename sh33c hvidx3 rename sh33d hvidx4 rename sh33a* sh33*_1 rename sh33b* sh33*_2 rename sh33c* sh33*_3 rename sh33d* sh33*_4 rename sh331* dis* rename disa* disH* rename disb* disS* rename disc* disV* rename disd* disM* rename dise* disL* rename disx* disO* * Now replace _a with the numerical value of sh33a; _b with the numerical * value of sh33b; similarly for c and d * There are alternative ways to do this save IAtemp.dta, replace forvalues li=1/4 { use IAtemp.dta, clear keep hv001 hv002 hvidx`li' dis*_`li' rename hvidx`li' hvidx keep if hvidx<95 rename *_* * save temp`li'.dta, replace } use temp1.dta, clear append using temp2.dta append using temp3.dta append using temp4.dta sort hv001 hv002 hvidx order hv001 hv002 hvidx label variable disH "Hearing" label variable disS "Speech" label variable disV "Visual" label variable disM "Mental" label variable disL "Locomotor" label variable disO "Other" * Save this file; it is a reduced PR file for people with any disabilities * It can be merged with the PR, IR, KR, BR, or MR file * Only 26,435 unweighted cases with any kind of disability