/* ==== For Stata 8, SE or Intercooled ==== */ ====================== Pgm1 ============================= set memory 200m use "c:\RandHRS\Stata\rndhrs_h" tab inw1 tab inw2 tab inw3 tab inw4 tab inw5 tab inw6 tab inw7 tab inw7 tab r8iwstat ===================== Wkshop ============================= set memory 200m use "c:\RandHRS\Stata\rndhrs_h" keep hhidpn rahhidpn inw1-inw8 hacohort ragender raracem r6iwstat r7iwstat r8iwstat r6higov r7higov r8higov r6doctor r7doctor r8doctor r6agey_e r7agey_e r8agey_e s6higov s7higov s8higov s6doctor s7doctor s8doctor keep if inw6==1 | inw7==1 | inw8==1 save "c:\MyPaper\Stata\wkshop" ======================= tab1 =============================== use "c:\MyPaper\Stata\wkshop" sum r6higov r7higov r8higov tab r8higov hacohort tab r7higov s7higov tab r7higov r8higov tab r7doctor r7higov, col tab r8doctor r8higov, col tab r8doctor ragender, col tab r8higov ragender, col tab r8doctor r8higov if ragender==1, col tab r8doctor r8higov if ragender==2, col ======================= mrgtab =============================== set memory 200m set maxvar 10000 use "c:\RandHRS\Stata\h04f1a" keep hhidpn rahhidpn hhid pn jn152 sort rahhidpn save "c:\MyPaper\Stata\h04x" use "c:\RandHRS\Stata\h06e2ah" keep hhidpn rahhidpn hhid pn kn152 sort rahhidpn save "c:\MyPaper\Stata\h06x" use "c:\MyPaper\Stata\wkshop" sort rahhidpn merge rahhidpn using "c:\MyPaper\Stata\h04x", _merge(mrg04) tab mrg04 sort rahhidpn merge rahhidpn using "c:\MyPaper\Stata\h06x", _merge(mrg06) tab mrg06 sort rahhidpn save "c:\MyPaper\Stata\wkplus" tab mrg04 inw7 tab mrg06 inw8 keep if inw7==1 & inw8==1 tab jn152 tab kn152 tab r7higov r8higov tab r7doctor r8doctor tab jn152 r7doctor tab kn152 r8doctor