cap log close log using "Z:\Angrist Work\Tape Data\Replicate_SOV_III_v1.log", replace ******************************************** * PROGRAM: Replicate_SOV_III_v1 * PROGRAMMER: Simone Schaner * PURPOSE: Replicate SOV code * in STATA * DATE CREATED: 5/7/07 * NOTES: Tabs for branch of serivce not * available because this data is * currently missing. The code will * be updated to include this variable * if the data can be recovered ********************************************* clear set mem 50m cd "C:\Documents and Settings\Simone\My Documents\Angrist Work\Backup\Veterans Work\Tape Data" *cd "Z:\Angrist Work\Tape Data" use soviii_ang93b * TEST qui { * REPLICATE SELECTION CRITERIA g byte vietnam= q4c8==1 g byte earlyavf= q4c9==1 g byte age= (agerec==2)*22 + (agerec==3)*27 + (agerec==4)*32 + /// (agerec==5)*37 + (agerec==6)*42 + (agerec==7)*47 + /// (agerec==8)*52 + (agerec==9)*57 + (agerec==10)*62 + /// (agerec==11)*67 replace age=. if agerec<2 | agerec>11 g yrsrv= (q13c==2)*1.75 + (q13c==3)*4 + (q13c==4)*8 + (q13c==5)*13 replace yrsrv=. if q13c<2 | q13c>5 g byte female= sex==2 g entgrade= (q15a==1)*0 + (q15a==2)*8 + (q15a==3)*9 + /// (q15a==4)*10 + (q15a==5)*11 + (q15a==6)*12 + /// (q15a==7)*13 + (q15a==8)*13 + (q15a==9)*14 + /// (q15a==10)*15 + (q15a==11)*16 + (q15a==12)*17 + /// (q15a==13)*18 + (q15a>13)*-99 replace entgrade=20 if q15b==4 replace entgrade=0 if entgrade<0 g curgrade= (q15c==1)*0 + (q15c==2)*8 + (q15c==3)*9 + /// (q15c==4)*10 + (q15c==5)*11 + (q15c==6)*12 + /// (q15c==7)*13 + (q15c==8)*13 + (q15c==9)*14 + /// (q15c==10)*15 + (q15c==11)*16 + (q15c==12)*17 + /// (q15c==13)*18 + (q15c>13)*-99 replace curgrade=20 if q15d==4 replace curgrade=0 if curgrade<0 g eddif= curgrade-entgrade g byte drafted= q10==1 g byte officer= q12==1 | q12==2 g size=cenplsz g byte curmar= q14a==1 g byte entmar= q14b==1 g byte entvoc= q15a==7 g byte curvoc= q15c==7 g byte health= q22c==1 g byte nonwhite= racerec>1 g byte hispanic= q3b==1 g byte knowgi= q31_3==1 g byte vcomp= q35f==1 g vcompamt= q35g*(q35g<12) g disper= q35j*(q35j<12) g byte usevoc= q38a==1 g byte newed= q39a==1 g byte anyaid= q39d==1 g byte anyfed= q39e1==1 | q39e2==1 | q39e3==1 g byte gibill= q39e5==1 g byte veap= q39e6==1 g byte otherva= q39e7==1 | q39e8==1 g byte anyva= gibill | veap | otherva g byte inelig= q39f==1 g spoused= (q46a==1)*0 + (q46a==2)*8 + (q46a==3)*9 + /// (q46a==4)*10 + (q46a==5)*11 + (q46a==6)*12 + /// (q46a==7)*13 + (q46a==8)*13 + (q46a==9)*14 + /// (q46a==10)*15 + (q46a==11)*16 + (q46a==12)*17 + /// (q46a==13)*18 + (q46a>13)*-99 replace spoused=20 if q46b5==1 replace spoused=0 if spoused<0 g byte spsvoc= q46a==7 g byte spswork= q46c==1 | q46c==1 g byte fulltime= q47a==1 g byte parttime= q47a==2 g byte unem= q47a==3 g byte outlf= q47a==3 | q47a>5 g earn86= q59a g lnearn= ln(earn86) g self86= q59b g lnself= ln(self86) g spsern86= q64a g spself86= q64b g numdep= q68a g byte depchild= q70a==1 g mardif= curmar-entmar g byte hs= q39b1 g byte coll_grad= q39b2==1 | q39b3==1 g byte corresp= q39b7==1 g byte voc_tech= q39b4==1 g byte ojt_appren= q39b5==1 | q39b6==1 g byte oth_train = q39b8==1 | q39b9==1 | q39b10==1 | q39b11==1 } * SELECTION CRITERIA keep if entgrade>8 keep if eddif>=0 & female==0 & (vietnam==1 | earlyavf==1) keep if age>=32 & age<=52 keep if yrsrv~=. keep vetwgt age agerec pser_02 pser_07 pser_08 vietnam-oth_train branch * TABS sum * tab earlyavf vietnam foreach var in age yrsrv branch entgrade curgrade eddif mardif { tab `var' } log close