new; #include utils.gau; #include utils1.gau; proc(3)=getres(h1,h2,h3,h4,who,startt,maxt,thmin1,thmax1,dth1,thmin2,thmax2,dth2); local res_70_80, res_70_90, res_70_00,botim; botim=hsec; output on; "comparing "$+who$+" in 1970 to "$+who$+" in 1980"; output off; res_70_80=grid_seq(h1,h2,startt,maxt,thmin1,thmax1,dth1,thmin2,thmax2,dth2); output on; "done in ";; (hsec-botim)/100;; "seconds"; " "; output off; botim=hsec; output on; "comparing "$+who$+" in 1970 to "$+who$+" in 1990"; output off; res_70_90=grid_seq(h1,h3,startt,maxt,thmin1,thmax1,dth1,thmin2,thmax2,dth2); output on; "done in ";; (hsec-botim)/100;; "seconds"; " ";output off; botim=hsec; output on; "comparing "$+who$+" in 1970 to "$+who$+" in 2000"; output off; res_70_00=grid_seq(h1,h4,startt,maxt,thmin1,thmax1,dth1,thmin2,thmax2,dth2); output on; "done in ";; (hsec-botim)/100;; "seconds"; " ";output off; retp(res_70_80,res_70_90,res_70_00); endp; proc(0)=findmax(r,j); local rr,ab,aa1,aa2; rr=maxc(r[.,1]); ab=selif(r[.,j],(r[.,1].eq rr)); aa1=minc(ab); aa2=maxc(ab); "& $(" ;; aa1;; ",";;aa2 ;;")$";; endp; proc(0)=writeres(r1,r2,r3,tit,lab1,lab2); local a1,a2; format /rd 9,3; "\\multicolumn{4}{c}{\\textbf{Results for ";; tit;; "}} ";; "\\\\"; "\\\\"; "& 1970--1980 & 1970--1990 & 1970--2000 \\\\"; "\\\\"; lab1 ;; findmax(r1,2); findmax(r2,2); findmax(r3,2); "\\\\"; lab2;; findmax(r1,3); findmax(r2,3); findmax(r3,3); "\\\\"; endp; botim=hsec; startt=45; maxt=35; thmin1=0.9; thmax1=1.4; dth1=0.05; thmin2=0.9; thmax2=1.4; dth2=0.05; output file=table3.out, reset; output on; "the risks considered here are CVD and cancer"; " "; output off; /* WHITE MALES */ load h1=haz_70wm; load h2=haz_80wm; load h3=haz_90wm; load h4=haz_00wm; h1=h1[.,1:2]; h2=h2[.,1:2]; h3=h3[.,1:2]; h4=h4[.,1:2]; {res_70_80wm1,res_70_90wm1,res_70_00wm1}=getres(h1,h2,h3,h4,"white males",startt,maxt,thmin1,thmax1,dth1,thmin2,thmax2,dth2); save res_70_80wm1,res_70_90wm1,res_70_00wm1; /* WHITE FEMALES */ load h1=haz_70wf; load h2=haz_80wf; load h3=haz_90wf; load h4=haz_00wf; h1=h1[.,1:2]; h2=h2[.,1:2]; h3=h3[.,1:2]; h4=h4[.,1:2]; {res_70_80wf1,res_70_90wf1,res_70_00wf1}=getres(h1,h2,h3,h4,"white females",startt,maxt,thmin1,thmax1,dth1,thmin2,thmax2,dth2); save res_70_80wf1,res_70_90wf1,res_70_00wf1; /* BLACK MALES */ load h1=haz_70bm; load h2=haz_80bm; load h3=haz_90bm; load h4=haz_00bm; h1=h1[.,1:2]; h2=h2[.,1:2]; h3=h3[.,1:2]; h4=h4[.,1:2]; {res_70_80bm1,res_70_90bm1,res_70_00bm1}=getres(h1,h2,h3,h4,"black males",startt,maxt,thmin1,thmax1,dth1,thmin2,thmax2,dth2); save res_70_80bm1,res_70_90bm1,res_70_00bm1; /* BLACK FEMALES */ load h1=haz_70bf; load h2=haz_80bf; load h3=haz_90bf; load h4=haz_00bf; h1=h1[.,1:2]; h2=h2[.,1:2]; h3=h3[.,1:2]; h4=h4[.,1:2]; {res_70_80bf1,res_70_90bf1,res_70_00bf1}=getres(h1,h2,h3,h4,"black females",startt,maxt,thmin1,thmax1,dth1,thmin2,thmax2,dth2); save res_70_80bf1,res_70_90bf1,res_70_00bf1; output off; output file=table3_2006.tex, reset; cls; "% Created on";; datestr(date); "% by writeres.gau"; " "; " ";" "; " "; "\\begin{center}"; "\\begin{tabular}{lccc}"; "\\multicolumn{4}{c}{\\textbf{TABLE 3: Marginal Identified Regions}} \\\\"; "\\\\"; "\\\\"; lab1="Coefficient on CVD"; lab2="Coefficient on Cancer"; r1=res_70_80wm1; r2=res_70_90wm1; r3=res_70_00wm1; tit="White Males"; writeres(r1,r2,r3,tit,lab1,lab2); "\\\\"; "\\\\"; r1=res_70_80wf1; r2=res_70_90wf1; r3=res_70_00wf1; tit="White Females"; writeres(r1,r2,r3,tit,lab1,lab2); "\\\\"; "\\\\"; r1=res_70_80bm1; r2=res_70_90bm1; r3=res_70_00bm1; tit="Black Males"; writeres(r1,r2,r3,tit,lab1,lab2); "\\\\"; "\\\\"; r1=res_70_80bf1; r2=res_70_90bf1; r3=res_70_00bf1; tit="Black Females"; writeres(r1,r2,r3,tit,lab1,lab2); "\\end{tabular}"; "\\end{center}"; output off;