// Projections and valuation ********************************** ********************************** ** FUTURE SST, CASE PREDICTIONS ** ********************************** ********************************** ************** * LOCAL VARS * ************** local mult_para = 4.990*1.1*142.4*(1-0.02) local mult_vul = 2.653*1.1*1.7*(1-0.10) local mult_alg = 2.843*1.1*142.4*(1-0.11) local mult_other = 8.782*1.1*142.7*(1-0.11) ************ * BASELINE * ************ // 1995 era: 1986-2005 import excel using "ProjectedSST_Coastline.xlsx", sheet("Baseline") firstrow case(upper) tempfile conus save `conus' clear import excel using "ProjectedSST_GCMrawSSTdelta_forHI_ONLY_v1.xlsx", sheet("Baseline") firstrow case(upper) tempfile hawaii save `hawaii' clear import excel using "ProjectedSST_Coastline_Alaska.xlsx", sheet("Baseline") firstrow case(upper) append using `conus' append using `hawaii' rename A FIPS gen state_num=substr(FIPS,-5,2) replace state_num=substr(FIPS,-4,1) if state_num=="" drop if state_num=="F" destring state_num, replace // CREATE VARIABLE NAMES FROM DATES local i 1 foreach v of varlist B-IG{ rename `v' y`i' local i = `i' + 1 } reshape long y, i(FIPS) j(year_month) rename y sst gen month = mod(year,12) replace month = 12 if month == 0 gen year = "" destring year, replace local i 1 foreach j of numlist 1986/2005{ replace year = `j' if (year_month/12) <= `i' & year_month/12 > `i' - 1 local i = `i' + 1 } // PREDICTION // include all vars in the models (regardless of stat sig) // PAR gen sst2=sst-8 if sst>=8 replace sst2=0 if sst2==. local X = "-6.458 + 0.204*sst2 + 0*1.state_num + 0.578*2.state_num + 1.712*6.state_num + 2.590*9.state_num + 0.447*10.state_num + 0*11.state_num + -0.323*12.state_num + -1.304*13.state_num + -0.593*15.state_num + -0.970*22.state_num + 1.414*23.state_num + -0.103*24.state_num + 2.483*25.state_num + -0.161*28.state_num + 0.0364*33.state_num + 1.084*34.state_num + 1.070*36.state_num + -1.012*37.state_num + 2.753*41.state_num + 0*42.state_num + 1.347*44.state_num + -0.327*45.state_num + -0.319*48.state_num + 0.242*51.state_num + 3.905*53.state_num" generate cases_para = exp(`X') /(1 + exp(`X')) replace cases_para = cases_para*`mult_para' drop sst2 // VUL gen sst2=sst-13 if sst>=13 & sst<20 replace sst2=0 if sst<13 replace sst2=7 if sst>20 gen sst3=sst-20 if sst>=20 replace sst3=0 if sst<20 local X = "-6.103 + 0.484*sst2 + 0.167*sst3 + 0*1.state_num + 0*2.state_num + -1.600*6.state_num + -0.725*9.state_num + -1.516*10.state_num + 0*11.state_num + -1.331*12.state_num + -2.212*13.state_num + -1.409*15.state_num + -1.657*22.state_num + -0.773*23.state_num + -0.583*24.state_num + -1.051*25.state_num + -0.652*28.state_num + 0*33.state_num + -1.554*34.state_num + -2.011*36.state_num + -2.272*37.state_num + -0.982*41.state_num + 0*42.state_num + -1.627*44.state_num + -2.123*45.state_num + -0.918*48.state_num + -1.312*51.state_num + 0*53.state_num" generate cases_vul = exp(`X') /(1 + exp(`X')) replace cases_vul = cases_vul*`mult_vul' drop sst2 sst3 // ALG gen sst2=sst-5 if sst>=5 & sst<22 replace sst2=0 if sst<5 replace sst2=17 if sst>22 gen sst3=sst-22 if sst>=22 replace sst3=0 if sst<22 local X = "-10.73 + 0.395*sst2 + 0.0960*sst3 + 0*1.state_num + 0*2.state_num + 3.387*6.state_num + 1.650*9.state_num + 1.271*10.state_num + 0*11.state_num + 1.125*12.state_num + -1.102*13.state_num + 2.321*15.state_num + -2.422*22.state_num + 3.138*23.state_num + 0.00945*24.state_num + 2.767*25.state_num + -1.799*28.state_num + 2.513*33.state_num + 1.202*34.state_num + 1.141*36.state_num + 0.319*37.state_num + 0*41.state_num + 0*42.state_num + 2.152*44.state_num + 1.098*45.state_num + 0.205*48.state_num + -1.111*51.state_num + 2.294*53.state_num" generate cases_alg = exp(`X') /(1 + exp(`X')) replace cases_alg = cases_alg*`mult_alg' drop sst2 sst3 // OTHER local X = "-6.262 + 0.137*sst + 0*1.state_num + -0.726*2.state_num + 0.394*6.state_num + 1.074*9.state_num + 0.110*10.state_num + 0*11.state_num + -0.0440*12.state_num + -1.820*13.state_num + 0.0000387*15.state_num + 0.115*22.state_num + 0.416*23.state_num + 0.127*24.state_num + 1.279*25.state_num + -0.414*28.state_num + 0.541*33.state_num + 0.354*34.state_num + -0.938*36.state_num + -0.432*37.state_num + 0.520*41.state_num + 0*42.state_num + 0.432*44.state_num + -1.055*45.state_num + -0.206*48.state_num + -0.311*51.state_num + 1.536*53.state_num" generate cases_other = exp(`X') /(1 + exp(`X')) replace cases_other = cases_other*`mult_other' collapse (sum) cases_para cases_vul cases_alg cases_other, by(FIPS state_num year) collapse (mean) cases_para cases_vul cases_alg cases_other, by(FIPS state_num) gen era=1995 gen rcp="baseline" gen run="baseline" tempfile baseline save `baseline' clear *************** * PROJECTIONS * *************** // 2030 era: 2020-2039 // 2050 era: 2040-2059 // 2070 era: 2060-2079 // 2090 era: 2080-2099 // CONUS foreach x in "CanESM2_rcp45" "CanESM2_rcp85" "MIROC5_rcp45" "MIROC5_rcp85" "HadGEM2ES_rcp85" "HadGEM2ES_rcp45" "GISSE2R_rcp85" "GISSE2R_rcp45" "GFDLCM3_rcp85" "GFDLCM3_rcp45" "CCSM4_rcp85" "CCSM4_rcp45" { import excel using "ProjectedSST_Coastline.xlsx", sheet(`x') firstrow case(upper) gen rcp=substr("`x'", -5, 5) gen run=substr("`x'", 1, 4) rename A FIPS gen state_num=substr(FIPS,-5,2) replace state_num=substr(FIPS,-4,1) if state_num=="" drop if state_num=="F" destring state_num, replace // CREATE VARIABLE NAMES FROM DATES local i 1 foreach v of varlist B-AQK{ rename `v' y`i' local i = `i' + 1 } reshape long y, i(FIPS) j(year_month) rename y sst gen month = mod(year,12) replace month = 12 if month == 0 gen year = "" destring year, replace local i 1 foreach j of numlist 2006/2099{ replace year = `j' if (year_month/12) <= `i' & year_month/12 > `i' - 1 local i = `i' + 1 } // PREDICTION // include all vars in the models (regardless of stat sig) except year dummies // PAR gen sst2=sst-8 if sst>=8 replace sst2=0 if sst2==. local X = "-6.458 + 0.204*sst2 + 0*1.state_num + 0.578*2.state_num + 1.712*6.state_num + 2.590*9.state_num + 0.447*10.state_num + 0*11.state_num + -0.323*12.state_num + -1.304*13.state_num + -0.593*15.state_num + -0.970*22.state_num + 1.414*23.state_num + -0.103*24.state_num + 2.483*25.state_num + -0.161*28.state_num + 0.0364*33.state_num + 1.084*34.state_num + 1.070*36.state_num + -1.012*37.state_num + 2.753*41.state_num + 0*42.state_num + 1.347*44.state_num + -0.327*45.state_num + -0.319*48.state_num + 0.242*51.state_num + 3.905*53.state_num" generate cases_para = exp(`X') /(1 + exp(`X')) replace cases_para = cases_para*`mult_para' drop sst2 // VUL gen sst2=sst-13 if sst>=13 & sst<20 replace sst2=0 if sst<13 replace sst2=7 if sst>20 gen sst3=sst-20 if sst>=20 replace sst3=0 if sst<20 local X = "-6.103 + 0.484*sst2 + 0.167*sst3 + 0*1.state_num + 0*2.state_num + -1.600*6.state_num + -0.725*9.state_num + -1.516*10.state_num + 0*11.state_num + -1.331*12.state_num + -2.212*13.state_num + -1.409*15.state_num + -1.657*22.state_num + -0.773*23.state_num + -0.583*24.state_num + -1.051*25.state_num + -0.652*28.state_num + 0*33.state_num + -1.554*34.state_num + -2.011*36.state_num + -2.272*37.state_num + -0.982*41.state_num + 0*42.state_num + -1.627*44.state_num + -2.123*45.state_num + -0.918*48.state_num + -1.312*51.state_num + 0*53.state_num" generate cases_vul = exp(`X') /(1 + exp(`X')) replace cases_vul = cases_vul*`mult_vul' drop sst2 sst3 // ALG gen sst2=sst-5 if sst>=5 & sst<22 replace sst2=0 if sst<5 replace sst2=17 if sst>22 gen sst3=sst-22 if sst>=22 replace sst3=0 if sst<22 local X = "-10.73 + 0.395*sst2 + 0.0960*sst3 + 0*1.state_num + 0*2.state_num + 3.387*6.state_num + 1.650*9.state_num + 1.271*10.state_num + 0*11.state_num + 1.125*12.state_num + -1.102*13.state_num + 2.321*15.state_num + -2.422*22.state_num + 3.138*23.state_num + 0.00945*24.state_num + 2.767*25.state_num + -1.799*28.state_num + 2.513*33.state_num + 1.202*34.state_num + 1.141*36.state_num + 0.319*37.state_num + 0*41.state_num + 0*42.state_num + 2.152*44.state_num + 1.098*45.state_num + 0.205*48.state_num + -1.111*51.state_num + 2.294*53.state_num" generate cases_alg = exp(`X') /(1 + exp(`X')) replace cases_alg = cases_alg*`mult_alg' drop sst2 sst3 // OTHER local X = "-6.262 + 0.137*sst + 0*1.state_num + -0.726*2.state_num + 0.394*6.state_num + 1.074*9.state_num + 0.110*10.state_num + 0*11.state_num + -0.0440*12.state_num + -1.820*13.state_num + 0.0000387*15.state_num + 0.115*22.state_num + 0.416*23.state_num + 0.127*24.state_num + 1.279*25.state_num + -0.414*28.state_num + 0.541*33.state_num + 0.354*34.state_num + -0.938*36.state_num + -0.432*37.state_num + 0.520*41.state_num + 0*42.state_num + 0.432*44.state_num + -1.055*45.state_num + -0.206*48.state_num + -0.311*51.state_num + 1.536*53.state_num" generate cases_other = exp(`X') /(1 + exp(`X')) replace cases_other = cases_other*`mult_other' collapse (sum) cases_para cases_vul cases_alg cases_other, by(FIPS state_num year rcp run) gen era=2030 if year>=2020 & year<=2039 replace era=2050 if year>=2040 & year<=2059 replace era=2070 if year>=2060 & year<=2079 replace era=2090 if year>=2080 & year<=2099 drop if era==. collapse (mean) cases_para cases_vul cases_alg cases_other, by(FIPS state_num era rcp run) tempfile conus_`x' save `conus_`x'' clear } // ALASKA foreach x in "CCSM4_rcp85" "CCSM4_rcp45" "GFDLCM3_rcp85" "GFDLCM3_rcp45" "GISSE2R_rcp85" "GISSE2R_rcp45" "IPSLCM5ALR_rcp85" "IPSLCM5ALR_rcp45" "MRICGCM3_rcp85" "MRICGCM3_rcp45" { import excel using "ProjectedSST_Coastline_Alaska.xlsx", sheet(`x') firstrow case(upper) gen rcp=substr("`x'", -5, 5) gen run=substr("`x'", 1, 4) rename A FIPS gen state_num=substr(FIPS,-5,2) replace state_num=substr(FIPS,-4,1) if state_num=="" drop if state_num=="F" destring state_num, replace // CREATE VARIABLE NAMES FROM DATES local i 1 foreach v of varlist B-AQK{ rename `v' y`i' local i = `i' + 1 } drop AQL- AQW // Alaska additions reshape long y, i(FIPS) j(year_month) rename y sst gen month = mod(year,12) replace month = 12 if month == 0 gen year = "" destring year, replace local i 1 foreach j of numlist 2006/2099{ replace year = `j' if (year_month/12) <= `i' & year_month/12 > `i' - 1 local i = `i' + 1 } // PREDICTION // include all vars in the models (regardless of stat sig) except year dummies // PAR gen sst2=sst-8 if sst>=8 replace sst2=0 if sst2==. local X = "-6.458 + 0.204*sst2 + 0*1.state_num + 0.578*2.state_num + 1.712*6.state_num + 2.590*9.state_num + 0.447*10.state_num + 0*11.state_num + -0.323*12.state_num + -1.304*13.state_num + -0.593*15.state_num + -0.970*22.state_num + 1.414*23.state_num + -0.103*24.state_num + 2.483*25.state_num + -0.161*28.state_num + 0.0364*33.state_num + 1.084*34.state_num + 1.070*36.state_num + -1.012*37.state_num + 2.753*41.state_num + 0*42.state_num + 1.347*44.state_num + -0.327*45.state_num + -0.319*48.state_num + 0.242*51.state_num + 3.905*53.state_num" generate cases_para = exp(`X') /(1 + exp(`X')) replace cases_para = cases_para*`mult_para' drop sst2 // VUL gen sst2=sst-13 if sst>=13 & sst<20 replace sst2=0 if sst<13 replace sst2=7 if sst>20 gen sst3=sst-20 if sst>=20 replace sst3=0 if sst<20 local X = "-6.103 + 0.484*sst2 + 0.167*sst3 + 0*1.state_num + 0*2.state_num + -1.600*6.state_num + -0.725*9.state_num + -1.516*10.state_num + 0*11.state_num + -1.331*12.state_num + -2.212*13.state_num + -1.409*15.state_num + -1.657*22.state_num + -0.773*23.state_num + -0.583*24.state_num + -1.051*25.state_num + -0.652*28.state_num + 0*33.state_num + -1.554*34.state_num + -2.011*36.state_num + -2.272*37.state_num + -0.982*41.state_num + 0*42.state_num + -1.627*44.state_num + -2.123*45.state_num + -0.918*48.state_num + -1.312*51.state_num + 0*53.state_num" generate cases_vul = exp(`X') /(1 + exp(`X')) replace cases_vul = cases_vul*`mult_vul' drop sst2 sst3 // ALG gen sst2=sst-5 if sst>=5 & sst<22 replace sst2=0 if sst<5 replace sst2=17 if sst>22 gen sst3=sst-22 if sst>=22 replace sst3=0 if sst<22 local X = "-10.73 + 0.395*sst2 + 0.0960*sst3 + 0*1.state_num + 0*2.state_num + 3.387*6.state_num + 1.650*9.state_num + 1.271*10.state_num + 0*11.state_num + 1.125*12.state_num + -1.102*13.state_num + 2.321*15.state_num + -2.422*22.state_num + 3.138*23.state_num + 0.00945*24.state_num + 2.767*25.state_num + -1.799*28.state_num + 2.513*33.state_num + 1.202*34.state_num + 1.141*36.state_num + 0.319*37.state_num + 0*41.state_num + 0*42.state_num + 2.152*44.state_num + 1.098*45.state_num + 0.205*48.state_num + -1.111*51.state_num + 2.294*53.state_num" generate cases_alg = exp(`X') /(1 + exp(`X')) replace cases_alg = cases_alg*`mult_alg' drop sst2 sst3 // OTHER local X = "-6.262 + 0.137*sst + 0*1.state_num + -0.726*2.state_num + 0.394*6.state_num + 1.074*9.state_num + 0.110*10.state_num + 0*11.state_num + -0.0440*12.state_num + -1.820*13.state_num + 0.0000387*15.state_num + 0.115*22.state_num + 0.416*23.state_num + 0.127*24.state_num + 1.279*25.state_num + -0.414*28.state_num + 0.541*33.state_num + 0.354*34.state_num + -0.938*36.state_num + -0.432*37.state_num + 0.520*41.state_num + 0*42.state_num + 0.432*44.state_num + -1.055*45.state_num + -0.206*48.state_num + -0.311*51.state_num + 1.536*53.state_num" generate cases_other = exp(`X') /(1 + exp(`X')) replace cases_other = cases_other*`mult_other' collapse (sum) cases_para cases_vul cases_alg cases_other, by(FIPS state_num year rcp run) gen era=2030 if year>=2020 & year<=2039 replace era=2050 if year>=2040 & year<=2059 replace era=2070 if year>=2060 & year<=2079 replace era=2090 if year>=2080 & year<=2099 drop if era==. collapse (mean) cases_para cases_vul cases_alg cases_other, by(FIPS state_num era rcp run) tempfile ak_`x' save `ak_`x'' clear } // HAWAII foreach x in "CanESM2_rcp45" "CanESM2_rcp85" "CCSM_rcp45" "CCSM_rcp85" "GISS_rcp85" "GISS_rcp45" "HadGEM2_rcp85" "HadGEM2_rcp45" "MIROC5_rcp45" "MIROC5_rcp85" { import excel using "ProjectedSST_GCMrawSSTdelta_forHI_ONLY_v1.xlsx", sheet(`x') firstrow case(upper) gen rcp=substr("`x'", -5, 5) gen run=substr("`x'", 1, 4) rename A FIPS gen state_num=substr(FIPS,-5,2) replace state_num=substr(FIPS,-4,1) if state_num=="" drop if state_num=="F" destring state_num, replace // CREATE VARIABLE NAMES FROM DATES local i 1 foreach v of varlist B-AQK{ rename `v' y`i' local i = `i' + 1 } capture drop AQL-AQW // Hawaii additions for some RCPs reshape long y, i(FIPS) j(year_month) rename y sst gen month = mod(year,12) replace month = 12 if month == 0 gen year = "" destring year, replace local i 1 foreach j of numlist 2006/2099{ replace year = `j' if (year_month/12) <= `i' & year_month/12 > `i' - 1 local i = `i' + 1 } // PREDICTION // include all vars in the models (regardless of stat sig) except year dummies // PAR gen sst2=sst-8 if sst>=8 replace sst2=0 if sst2==. local X = "-6.458 + 0.204*sst2 + 0*1.state_num + 0.578*2.state_num + 1.712*6.state_num + 2.590*9.state_num + 0.447*10.state_num + 0*11.state_num + -0.323*12.state_num + -1.304*13.state_num + -0.593*15.state_num + -0.970*22.state_num + 1.414*23.state_num + -0.103*24.state_num + 2.483*25.state_num + -0.161*28.state_num + 0.0364*33.state_num + 1.084*34.state_num + 1.070*36.state_num + -1.012*37.state_num + 2.753*41.state_num + 0*42.state_num + 1.347*44.state_num + -0.327*45.state_num + -0.319*48.state_num + 0.242*51.state_num + 3.905*53.state_num" generate cases_para = exp(`X') /(1 + exp(`X')) replace cases_para = cases_para*`mult_para' drop sst2 // VUL gen sst2=sst-13 if sst>=13 & sst<20 replace sst2=0 if sst<13 replace sst2=7 if sst>20 gen sst3=sst-20 if sst>=20 replace sst3=0 if sst<20 local X = "-6.103 + 0.484*sst2 + 0.167*sst3 + 0*1.state_num + 0*2.state_num + -1.600*6.state_num + -0.725*9.state_num + -1.516*10.state_num + 0*11.state_num + -1.331*12.state_num + -2.212*13.state_num + -1.409*15.state_num + -1.657*22.state_num + -0.773*23.state_num + -0.583*24.state_num + -1.051*25.state_num + -0.652*28.state_num + 0*33.state_num + -1.554*34.state_num + -2.011*36.state_num + -2.272*37.state_num + -0.982*41.state_num + 0*42.state_num + -1.627*44.state_num + -2.123*45.state_num + -0.918*48.state_num + -1.312*51.state_num + 0*53.state_num" generate cases_vul = exp(`X') /(1 + exp(`X')) replace cases_vul = cases_vul*`mult_vul' drop sst2 sst3 // ALG gen sst2=sst-5 if sst>=5 & sst<22 replace sst2=0 if sst<5 replace sst2=17 if sst>22 gen sst3=sst-22 if sst>=22 replace sst3=0 if sst<22 local X = "-10.73 + 0.395*sst2 + 0.0960*sst3 + 0*1.state_num + 0*2.state_num + 3.387*6.state_num + 1.650*9.state_num + 1.271*10.state_num + 0*11.state_num + 1.125*12.state_num + -1.102*13.state_num + 2.321*15.state_num + -2.422*22.state_num + 3.138*23.state_num + 0.00945*24.state_num + 2.767*25.state_num + -1.799*28.state_num + 2.513*33.state_num + 1.202*34.state_num + 1.141*36.state_num + 0.319*37.state_num + 0*41.state_num + 0*42.state_num + 2.152*44.state_num + 1.098*45.state_num + 0.205*48.state_num + -1.111*51.state_num + 2.294*53.state_num" generate cases_alg = exp(`X') /(1 + exp(`X')) replace cases_alg = cases_alg*`mult_alg' drop sst2 sst3 // OTHER local X = "-6.262 + 0.137*sst + 0*1.state_num + -0.726*2.state_num + 0.394*6.state_num + 1.074*9.state_num + 0.110*10.state_num + 0*11.state_num + -0.0440*12.state_num + -1.820*13.state_num + 0.0000387*15.state_num + 0.115*22.state_num + 0.416*23.state_num + 0.127*24.state_num + 1.279*25.state_num + -0.414*28.state_num + 0.541*33.state_num + 0.354*34.state_num + -0.938*36.state_num + -0.432*37.state_num + 0.520*41.state_num + 0*42.state_num + 0.432*44.state_num + -1.055*45.state_num + -0.206*48.state_num + -0.311*51.state_num + 1.536*53.state_num" generate cases_other = exp(`X') /(1 + exp(`X')) replace cases_other = cases_other*`mult_other' collapse (sum) cases_para cases_vul cases_alg cases_other, by(FIPS state_num year rcp run) gen era=2030 if year>=2020 & year<=2039 replace era=2050 if year>=2040 & year<=2059 replace era=2070 if year>=2060 & year<=2079 replace era=2090 if year>=2080 & year<=2099 drop if era==. collapse (mean) cases_para cases_vul cases_alg cases_other, by(FIPS state_num era rcp run) tempfile hi_`x' save `hi_`x'' clear } use `baseline' append using `conus_CanESM2_rcp85' append using `conus_CanESM2_rcp45' append using `conus_MIROC5_rcp45' append using `conus_MIROC5_rcp85' append using `conus_HadGEM2ES_rcp85' append using `conus_HadGEM2ES_rcp45' append using `conus_GISSE2R_rcp85' append using `conus_GISSE2R_rcp45' append using `conus_GFDLCM3_rcp85' append using `conus_GFDLCM3_rcp45' append using `conus_CCSM4_rcp85' append using `conus_CCSM4_rcp45' append using `ak_GISSE2R_rcp85' append using `ak_GISSE2R_rcp45' append using `ak_GFDLCM3_rcp85' append using `ak_GFDLCM3_rcp45' append using `ak_CCSM4_rcp85' append using `ak_CCSM4_rcp45' append using `ak_MRICGCM3_rcp85' append using `ak_MRICGCM3_rcp45' append using `ak_IPSLCM5ALR_rcp85' append using `ak_IPSLCM5ALR_rcp45' append using `hi_CanESM2_rcp85' append using `hi_CanESM2_rcp45' append using `hi_MIROC5_rcp45' append using `hi_MIROC5_rcp85' append using `hi_HadGEM2_rcp85' append using `hi_HadGEM2_rcp45' append using `hi_GISS_rcp85' append using `hi_GISS_rcp45' append using `hi_CCSM_rcp85' append using `hi_CCSM_rcp45' /* table era run if rcp=="baseline", contents(sum cases_para) table era run if rcp=="rcp45", contents(sum cases_para) table era run if rcp=="rcp85", contents(sum cases_para) table era run if rcp=="baseline", contents(sum cases_vul) table era run if rcp=="rcp45", contents(sum cases_vul) table era run if rcp=="rcp85", contents(sum cases_vul) table era run if rcp=="baseline", contents(sum cases_alg) table era run if rcp=="rcp45", contents(sum cases_alg) table era run if rcp=="rcp85", contents(sum cases_alg) table era run if rcp=="baseline", contents(sum cases_other) table era run if rcp=="rcp45", contents(sum cases_other) table era run if rcp=="rcp85", contents(sum cases_other) */ // average across model runs at the county level collapse (mean) cases_para cases_vul cases_alg cases_other (min) Mincases_para=cases_para Mincases_vul=cases_vul Mincases_alg=cases_alg Mincases_other=cases_other (max) Maxcases_para=cases_para Maxcases_vul=cases_vul Maxcases_alg=cases_alg Maxcases_other=cases_other, by(FIPS state_num era rcp) sort state_num FIPS rcp era // sum across counties collapse (sum) cases_para-Maxcases_other, by(era rcp) sort rcp era save "PROJECTIONS_CASES", replace *************** *************** ** VALUATION ** *************** *************** /* health outcome categories 1-Visited physician, recovered 2-Hospitalized (non-sepsis) 3-Post-hospitalization, recovery (non-sepsis) 4-Hospitalized (sepsis) 5-Post-hospitalization, recovery (sepsis) 6-Post-hospitalization, death 7-Unreported cases */ drop Mincases_para-Maxcases_other local cost_vsl_e04_2010 = 10339531 local cost_vsl_e04_2030 = 11700000 local cost_vsl_e04_2050 = 13200000 local cost_vsl_e04_2070 = 14600000 local cost_vsl_e04_2090 = 16100000 local cost_wage_2010 = 175.35 local cost_wage_2030 = 238.75 local cost_wage_2050 = 320.89 local cost_wage_2070 = 416.15 local cost_wage_2090 = 528.39 gen cases_para_1=cases_para*0.1250 gen cases_para_2=cases_para*0.0029 gen cases_para_3=cases_para*0.0028 gen cases_para_4=cases_para*0 gen cases_para_5=cases_para*0 gen cases_para_6=cases_para*0.0001 gen cases_para_7=cases_para*0.8721 gen cases_vul_1=cases_vul*0.0313 gen cases_vul_2=cases_vul*0.1928 gen cases_vul_3=cases_vul*0.1928 gen cases_vul_4=cases_vul*0.7760 gen cases_vul_5=cases_vul*0.4010 gen cases_vul_6=cases_vul*0.3750 gen cases_vul_7=cases_vul*0 gen cases_alg_1=cases_alg*0.1250 gen cases_alg_2=cases_alg*0.0047 gen cases_alg_3=cases_alg*0.0043 gen cases_alg_4=cases_alg*0 gen cases_alg_5=cases_alg*0 gen cases_alg_6=cases_alg*0.0005 gen cases_alg_7=cases_alg*0.8703 gen cases_other_1=cases_other*0.1250 gen cases_other_2=cases_other*0.0047 gen cases_other_3=cases_other*0.0043 gen cases_other_4=cases_other*0 gen cases_other_5=cases_other*0 gen cases_other_6=cases_other*0.0005 gen cases_other_7=cases_other*0.8703 gen costd_para_1=cases_para_1*516.18 gen costd_para_2=cases_para_2*17889.49 gen costd_para_3=cases_para_3*146.05 gen costi_para_1=cases_para_1*1.67*`cost_wage_2010' if era==1995 replace costi_para_1=cases_para_1*1.67*`cost_wage_2030' if era==2030 replace costi_para_1=cases_para_1*1.67*`cost_wage_2050' if era==2050 replace costi_para_1=cases_para_1*1.67*`cost_wage_2070' if era==2070 replace costi_para_1=cases_para_1*1.67*`cost_wage_2090' if era==2090 gen costi_para_2=cases_para_2*6.43*`cost_wage_2010' if era==1995 replace costi_para_2=cases_para_2*6.43*`cost_wage_2030' if era==2030 replace costi_para_2=cases_para_2*6.43*`cost_wage_2050' if era==2050 replace costi_para_2=cases_para_2*6.43*`cost_wage_2070' if era==2070 replace costi_para_2=cases_para_2*6.43*`cost_wage_2090' if era==2090 gen costi_para_3=cases_para_3*4.29*`cost_wage_2010' if era==1995 replace costi_para_3=cases_para_3*4.29*`cost_wage_2030' if era==2030 replace costi_para_3=cases_para_3*4.29*`cost_wage_2050' if era==2050 replace costi_para_3=cases_para_3*4.29*`cost_wage_2070' if era==2070 replace costi_para_3=cases_para_3*4.29*`cost_wage_2090' if era==2090 gen costi_para_7=cases_para_7*0.5*`cost_wage_2010' if era==1995 replace costi_para_7=cases_para_7*0.5*`cost_wage_2030' if era==2030 replace costi_para_7=cases_para_7*0.5*`cost_wage_2050' if era==2050 replace costi_para_7=cases_para_7*0.5*`cost_wage_2070' if era==2070 replace costi_para_7=cases_para_7*0.5*`cost_wage_2090' if era==2090 gen costm_para_6=cases_para_6*`cost_vsl_e04_2010' if era==1995 replace costm_para_6=cases_para_6*`cost_vsl_e04_2030' if era==2030 replace costm_para_6=cases_para_6*`cost_vsl_e04_2050' if era==2050 replace costm_para_6=cases_para_6*`cost_vsl_e04_2070' if era==2070 replace costm_para_6=cases_para_6*`cost_vsl_e04_2090' if era==2090 gen costd_vul_1=cases_vul_1*516.18 gen costd_vul_2=cases_vul_2*41408.12 gen costd_vul_3=cases_vul_3*146.05 gen costd_vul_4=cases_vul_4*123226.09 gen costd_vul_5=cases_vul_5*146.05 gen costi_vul_1=cases_vul_1*1.67*`cost_wage_2010' if era==1995 replace costi_vul_1=cases_vul_1*1.67*`cost_wage_2030' if era==2030 replace costi_vul_1=cases_vul_1*1.67*`cost_wage_2050' if era==2050 replace costi_vul_1=cases_vul_1*1.67*`cost_wage_2070' if era==2070 replace costi_vul_1=cases_vul_1*1.67*`cost_wage_2090' if era==2090 gen costi_vul_2=cases_vul_2*6.43*`cost_wage_2010' if era==1995 replace costi_vul_2=cases_vul_2*6.43*`cost_wage_2030' if era==2030 replace costi_vul_2=cases_vul_2*6.43*`cost_wage_2050' if era==2050 replace costi_vul_2=cases_vul_2*6.43*`cost_wage_2070' if era==2070 replace costi_vul_2=cases_vul_2*6.43*`cost_wage_2090' if era==2090 gen costi_vul_3=cases_vul_3*4.29*`cost_wage_2010' if era==1995 replace costi_vul_3=cases_vul_3*4.29*`cost_wage_2030' if era==2030 replace costi_vul_3=cases_vul_3*4.29*`cost_wage_2050' if era==2050 replace costi_vul_3=cases_vul_3*4.29*`cost_wage_2070' if era==2070 replace costi_vul_3=cases_vul_3*4.29*`cost_wage_2090' if era==2090 gen costi_vul_4=cases_vul_4*5.0*`cost_wage_2010' if era==1995 replace costi_vul_4=cases_vul_4*5.0*`cost_wage_2030' if era==2030 replace costi_vul_4=cases_vul_4*5.0*`cost_wage_2050' if era==2050 replace costi_vul_4=cases_vul_4*5.0*`cost_wage_2070' if era==2070 replace costi_vul_4=cases_vul_4*5.0*`cost_wage_2090' if era==2090 gen costi_vul_5=cases_vul_5*5.0*`cost_wage_2010' if era==1995 replace costi_vul_5=cases_vul_5*5.0*`cost_wage_2030' if era==2030 replace costi_vul_5=cases_vul_5*5.0*`cost_wage_2050' if era==2050 replace costi_vul_5=cases_vul_5*5.0*`cost_wage_2070' if era==2070 replace costi_vul_5=cases_vul_5*5.0*`cost_wage_2090' if era==2090 gen costm_vul_6=cases_vul_6*`cost_vsl_e04_2010' if era==1995 replace costm_vul_6=cases_vul_6*`cost_vsl_e04_2030' if era==2030 replace costm_vul_6=cases_vul_6*`cost_vsl_e04_2050' if era==2050 replace costm_vul_6=cases_vul_6*`cost_vsl_e04_2070' if era==2070 replace costm_vul_6=cases_vul_6*`cost_vsl_e04_2090' if era==2090 gen costd_alg_1=cases_alg_1*658.63 gen costd_alg_2=cases_alg_2*22826.34 gen costd_alg_3=cases_alg_3*186.35 gen costi_alg_1=cases_alg_1*1.67*`cost_wage_2010' if era==1995 replace costi_alg_1=cases_alg_1*1.67*`cost_wage_2030' if era==2030 replace costi_alg_1=cases_alg_1*1.67*`cost_wage_2050' if era==2050 replace costi_alg_1=cases_alg_1*1.67*`cost_wage_2070' if era==2070 replace costi_alg_1=cases_alg_1*1.67*`cost_wage_2090' if era==2090 gen costi_alg_2=cases_alg_2*6.43*`cost_wage_2010' if era==1995 replace costi_alg_2=cases_alg_2*6.43*`cost_wage_2030' if era==2030 replace costi_alg_2=cases_alg_2*6.43*`cost_wage_2050' if era==2050 replace costi_alg_2=cases_alg_2*6.43*`cost_wage_2070' if era==2070 replace costi_alg_2=cases_alg_2*6.43*`cost_wage_2090' if era==2090 gen costi_alg_3=cases_alg_3*4.29*`cost_wage_2010' if era==1995 replace costi_alg_3=cases_alg_3*4.29*`cost_wage_2030' if era==2030 replace costi_alg_3=cases_alg_3*4.29*`cost_wage_2050' if era==2050 replace costi_alg_3=cases_alg_3*4.29*`cost_wage_2070' if era==2070 replace costi_alg_3=cases_alg_3*4.29*`cost_wage_2090' if era==2090 gen costi_alg_7=cases_alg_7*0.5*`cost_wage_2010' if era==1995 replace costi_alg_7=cases_alg_7*0.5*`cost_wage_2030' if era==2030 replace costi_alg_7=cases_alg_7*0.5*`cost_wage_2050' if era==2050 replace costi_alg_7=cases_alg_7*0.5*`cost_wage_2070' if era==2070 replace costi_alg_7=cases_alg_7*0.5*`cost_wage_2090' if era==2090 gen costm_alg_6=cases_alg_6*`cost_vsl_e04_2010' if era==1995 replace costm_alg_6=cases_alg_6*`cost_vsl_e04_2030' if era==2030 replace costm_alg_6=cases_alg_6*`cost_vsl_e04_2050' if era==2050 replace costm_alg_6=cases_alg_6*`cost_vsl_e04_2070' if era==2070 replace costm_alg_6=cases_alg_6*`cost_vsl_e04_2090' if era==2090 gen costd_other_1=cases_other_1*658.63 gen costd_other_2=cases_other_2*22826.34 gen costd_other_3=cases_other_3*186.35 gen costi_other_1=cases_other_1*1.67*`cost_wage_2010' if era==1995 replace costi_other_1=cases_other_1*1.67*`cost_wage_2030' if era==2030 replace costi_other_1=cases_other_1*1.67*`cost_wage_2050' if era==2050 replace costi_other_1=cases_other_1*1.67*`cost_wage_2070' if era==2070 replace costi_other_1=cases_other_1*1.67*`cost_wage_2090' if era==2090 gen costi_other_2=cases_other_2*6.43*`cost_wage_2010' if era==1995 replace costi_other_2=cases_other_2*6.43*`cost_wage_2030' if era==2030 replace costi_other_2=cases_other_2*6.43*`cost_wage_2050' if era==2050 replace costi_other_2=cases_other_2*6.43*`cost_wage_2070' if era==2070 replace costi_other_2=cases_other_2*6.43*`cost_wage_2090' if era==2090 gen costi_other_3=cases_other_3*4.29*`cost_wage_2010' if era==1995 replace costi_other_3=cases_other_3*4.29*`cost_wage_2030' if era==2030 replace costi_other_3=cases_other_3*4.29*`cost_wage_2050' if era==2050 replace costi_other_3=cases_other_3*4.29*`cost_wage_2070' if era==2070 replace costi_other_3=cases_other_3*4.29*`cost_wage_2090' if era==2090 gen costi_other_7=cases_other_7*0.5*`cost_wage_2010' if era==1995 replace costi_other_7=cases_other_7*0.5*`cost_wage_2030' if era==2030 replace costi_other_7=cases_other_7*0.5*`cost_wage_2050' if era==2050 replace costi_other_7=cases_other_7*0.5*`cost_wage_2070' if era==2070 replace costi_other_7=cases_other_7*0.5*`cost_wage_2090' if era==2090 gen costm_other_6=cases_other_6*`cost_vsl_e04_2010' if era==1995 replace costm_other_6=cases_other_6*`cost_vsl_e04_2030' if era==2030 replace costm_other_6=cases_other_6*`cost_vsl_e04_2050' if era==2050 replace costm_other_6=cases_other_6*`cost_vsl_e04_2070' if era==2070 replace costm_other_6=cases_other_6*`cost_vsl_e04_2090' if era==2090 // totals by direct medical, indirect productivity, and mortality egen costd_para_all=rowtotal(costd_para_*) egen costi_para_all=rowtotal(costi_para_*) egen costm_para_all=rowtotal(costm_para_*) egen costd_vul_all=rowtotal(costd_vul_*) egen costi_vul_all=rowtotal(costi_vul_*) egen costm_vul_all=rowtotal(costm_vul_*) egen costd_alg_all=rowtotal(costd_alg_*) egen costi_alg_all=rowtotal(costi_alg_*) egen costm_alg_all=rowtotal(costm_alg_*) egen costd_other_all=rowtotal(costd_other_*) egen costi_other_all=rowtotal(costi_other_*) egen costm_other_all=rowtotal(costm_other_*) sort rcp era browse era rcp costd_para_all- costm_other_all save "PROJECTIONS_VALUATION", replace