new; #include utils.gau; #include utils1.gau; #include utils3.gau; proc(3)=getres(h1,h2,h3,h4,who,startt,maxt,thmin1,thmax1,dth1); 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_uni(h1,h2,startt,maxt,thmin1,thmax1,dth1); 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_uni(h1,h3,startt,maxt,thmin1,thmax1,dth1); 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_uni(h1,h4,startt,maxt,thmin1,thmax1,dth1); output on; "done in ";; (hsec-botim)/100;; "seconds"; " ";output off; retp(res_70_80,res_70_90,res_70_00); endp; botim=hsec; startt=45; maxt=35; thmin1=0.9; thmax1=1.4; dth1=0.05; output file=ba1univ.out, reset; output on; "the risk considered here is CVD"; " "; output off; /* WHITE MALES */ load h1=haz_70wm; load h2=haz_80wm; load h3=haz_90wm; load h4=haz_00wm; h1=h1[.,1]; h2=h2[.,1]; h3=h3[.,1]; h4=h4[.,1]; {res_70_80wm_cvd,res_70_90wm_cvd,res_70_00wm_cvd}=getres(h1,h2,h3,h4,"white males",startt,maxt,thmin1,thmax1,dth1); /* WHITE FEMALES */ load h1=haz_70wf; load h2=haz_80wf; load h3=haz_90wf; load h4=haz_00wf; h1=h1[.,1]; h2=h2[.,1]; h3=h3[.,1]; h4=h4[.,1]; {res_70_80wf_cvd,res_70_90wf_cvd,res_70_00wf_cvd}=getres(h1,h2,h3,h4,"white females",startt,maxt,thmin1,thmax1,dth1); /* BLACK MALES */ load h1=haz_70bm; load h2=haz_80bm; load h3=haz_90bm; load h4=haz_00bm; h1=h1[.,1]; h2=h2[.,1]; h3=h3[.,1]; h4=h4[.,1]; {res_70_80bm_cvd,res_70_90bm_cvd,res_70_00bm_cvd}=getres(h1,h2,h3,h4,"black males",startt,maxt,thmin1,thmax1,dth1); /* BLACK FEMALES */ load h1=haz_70bf; load h2=haz_80bf; load h3=haz_90bf; load h4=haz_00bf; h1=h1[.,1]; h2=h2[.,1]; h3=h3[.,1]; h4=h4[.,1]; {res_70_80bf_cvd,res_70_90bf_cvd,res_70_00bf_cvd}=getres(h1,h2,h3,h4,"black females",startt,maxt,thmin1,thmax1,dth1); /* *********************************************************** */ output on; "the risk considered here is Cancer"; " "; output off; /* WHITE MALES */ load h1=haz_70wm; load h2=haz_80wm; load h3=haz_90wm; load h4=haz_00wm; h1=h1[.,2]; h2=h2[.,2]; h3=h3[.,2]; h4=h4[.,2]; {res_70_80wm_can,res_70_90wm_can,res_70_00wm_can}=getres(h1,h2,h3,h4,"white males",startt,maxt,thmin1,thmax1,dth1); /* WHITE FEMALES */ load h1=haz_70wf; load h2=haz_80wf; load h3=haz_90wf; load h4=haz_00wf; h1=h1[.,2]; h2=h2[.,2]; h3=h3[.,2]; h4=h4[.,2]; {res_70_80wf_can,res_70_90wf_can,res_70_00wf_can}=getres(h1,h2,h3,h4,"white females",startt,maxt,thmin1,thmax1,dth1); /* BLACK MALES */ load h1=haz_70bm; load h2=haz_80bm; load h3=haz_90bm; load h4=haz_00bm; h1=h1[.,2]; h2=h2[.,2]; h3=h3[.,2]; h4=h4[.,2]; {res_70_80bm_can,res_70_90bm_can,res_70_00bm_can}=getres(h1,h2,h3,h4,"black males",startt,maxt,thmin1,thmax1,dth1); /* BLACK FEMALES */ load h1=haz_70bf; load h2=haz_80bf; load h3=haz_90bf; load h4=haz_00bf; h1=h1[.,2]; h2=h2[.,2]; h3=h3[.,2]; h4=h4[.,2]; {res_70_80bf_can,res_70_90bf_can,res_70_00bf_can}=getres(h1,h2,h3,h4,"black females",startt,maxt,thmin1,thmax1,dth1); /* *********************************************************** */ /* *********************************************************** */ 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,lab1); local a1,a2; format /rd 9,3; lab1 ;; findmax(r1,2); findmax(r2,2); findmax(r3,2); "\\\\"; endp; output file=table2_2006.tex, reset; cls; lab1="Coefficient on CVD"; lab2="Coefficient on Cancer"; lab3="Coef. on Cancer (excl lung)"; lab4="Coef. on Lung Cancer"; "% Created on";; datestr(date); "% by writeres.gau"; " "; " ";" "; " "; "\\begin{center}"; "\\begin{tabular}{lccc}"; "\\multicolumn{4}{c}{\\textbf{TABLE: Marginal Identified Regions}} \\\\"; "\\\\"; "\\\\"; "\\multicolumn{4}{c}{\\textbf{Results for White Males}} \\\\"; "\\\\"; " & 1970--1980 & 1970--1990 & 1970--2000 \\\\"; "\\\\"; r1=res_70_80wm_cvd; r2=res_70_90wm_cvd; r3=res_70_00wm_cvd; writeres(r1,r2,r3,lab1); r1=res_70_80wm_can; r2=res_70_90wm_can; r3=res_70_00wm_can; writeres(r1,r2,r3,lab2); "\\\\"; "\\multicolumn{4}{c}{\\textbf{Results for White Females}} \\\\"; "\\\\"; " & 1970--1980 & 1970--1990 & 1970--2000 \\\\"; "\\\\"; r1=res_70_80wf_cvd; r2=res_70_90wf_cvd; r3=res_70_00wf_cvd; writeres(r1,r2,r3,lab1); r1=res_70_80wf_can; r2=res_70_90wf_can; r3=res_70_00wf_can; writeres(r1,r2,r3,lab2); "\\\\"; "\\multicolumn{4}{c}{\\textbf{Results for Black Males}} \\\\"; "\\\\"; " & 1970--1980 & 1970--1990 & 1970--2000 \\\\"; "\\\\"; r1=res_70_80bm_cvd; r2=res_70_90bm_cvd; r3=res_70_00bm_cvd; writeres(r1,r2,r3,lab1); r1=res_70_80bm_can; r2=res_70_90bm_can; r3=res_70_00bm_can; writeres(r1,r2,r3,lab2); "\\\\"; "\\multicolumn{4}{c}{\\textbf{Results for Black Females}} \\\\"; "\\\\"; " & 1970--1980 & 1970--1990 & 1970--2000 \\\\"; "\\\\"; r1=res_70_80bf_cvd; r2=res_70_90bf_cvd; r3=res_70_00bf_cvd; writeres(r1,r2,r3,lab1); r1=res_70_80bf_can; r2=res_70_90bf_can; r3=res_70_00bf_can; writeres(r1,r2,r3,lab2); "\\\\"; "\\\\"; "\\end{tabular}"; "\\end{center}"; " "; " "; /* ******************************************** */ " "; " "; output off;