#Load Ozone Dataset
load("Ozone Data with Region.RData")
combinedAir.final<-df4
combinedAir.final<-arrange(combinedAir.final,MonitorID,Year)
combinedAir.final$USDM.categorical<-factor(combinedAir.final$USDM.categorical,levels=c("NoDrought","ModerateDrought","SevereDrought"))
md2_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =combinedAir.final,
index = c("MonitorID","Year","month"),
model = "random")
md2_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =combinedAir.final,
index = c("MonitorID","Year","month"),
model = "between")
stargazer(md2_random,md2_fix,type = "text", title = "All Regions", align = TRUE,
add.lines = list(c("Model Name", "Random Effect Model", "Fixed Effect Model")),
column.labels = c("Random Effect Model", "Fixed Effect Model"),
dep.var.caption = "Dependent Variable: Ozone Max",
dep.var.labels.include = FALSE,
omit.table.layout = "#")
##
## All Regions
## =============================================================================
## Dependent Variable: Ozone Max
## ---------------------------------------------
## Random Effect Model Fixed Effect Model
## -----------------------------------------------------------------------------
## USDM.categoricalModerateDrought 0.489*** 3.039***
## (0.012) (0.756)
##
## USDM.categoricalSevereDrought 0.281*** 4.763***
## (0.018) (1.041)
##
## elevation 0.004*** 0.007***
## (0.0002) (0.0003)
##
## Longitude 0.147*** 0.091***
## (0.006) (0.010)
##
## Latitude 0.215*** 0.400***
## (0.020) (0.031)
##
## tdmean -0.848*** -0.025
## (0.001) (0.047)
##
## tmean 1.359*** 0.991***
## (0.001) (0.040)
##
## ppt -0.134*** -0.142
## (0.001) (0.165)
##
## Constant 32.058*** 16.369***
## (0.999) (2.097)
##
## -----------------------------------------------------------------------------
## Model Name Random Effect Model Fixed Effect Model
## Observations 6,589,427 1,959
## R2 0.223 0.486
## Adjusted R2 0.223 0.484
## F Statistic 1,857,483.000*** 230.701*** (df = 8; 1950)
## =============================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
ne<- combinedAir.final%>%
filter(noaa_region=="northeast")
ne_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =ne,
index = c("MonitorID","Year","month"),
model = "random")
ne_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =ne,
index = c("MonitorID","Year","month"),
model = "between")
stargazer(ne_random,ne_fix,type = "text", title = "Northeast", align = TRUE,
add.lines = list(c("Model Name", "Random Effect Model", "Fixed Effect Model")),
column.labels = c("Random Effect Model", "Fixed Effect Model"),
dep.var.caption = "Dependent Variable: Ozone Max",
dep.var.labels.include = FALSE,
omit.table.layout = "#")
##
## Northeast
## ===========================================================================
## Dependent Variable: Ozone Max
## -------------------------------------------
## Random Effect Model Fixed Effect Model
## ---------------------------------------------------------------------------
## USDM.categoricalModerateDrought -0.359*** -1.113
## (0.043) (3.360)
##
## USDM.categoricalSevereDrought -1.274*** 0.637
## (0.141) (8.871)
##
## elevation 0.013*** 0.012***
## (0.001) (0.002)
##
## Longitude 0.298*** 0.321***
## (0.080) (0.117)
##
## Latitude -0.703*** -0.793***
## (0.137) (0.209)
##
## tdmean -1.343*** 2.176***
## (0.004) (0.283)
##
## tmean 1.932*** -0.958***
## (0.005) (0.289)
##
## ppt -0.059*** -1.657***
## (0.002) (0.495)
##
## Constant 74.381*** 96.922***
## (10.875) (17.402)
##
## ---------------------------------------------------------------------------
## Model Name Random Effect Model Fixed Effect Model
## Observations 960,225 283
## R2 0.245 0.636
## Adjusted R2 0.245 0.626
## F Statistic 303,857.100*** 59.912*** (df = 8; 274)
## ===========================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
nr<- combinedAir.final%>%
filter(noaa_region=="northern_rockies")
nr_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =nr,
index = c("MonitorID","Year","month"),
model = "random")
nr_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =nr,
index = c("MonitorID","Year","month"),
model = "between")
stargazer(nr_random,nr_fix,type = "text", title = "Northern Rockies", align = TRUE,
add.lines = list(c("Model Name", "Random Effect Model", "Fixed Effect Model")),
column.labels = c("Random Effect Model", "Fixed Effect Model"),
dep.var.caption = "Dependent Variable: Ozone Max",
dep.var.labels.include = FALSE,
omit.table.layout = "#")
##
## Northern Rockies
## ==========================================================================
## Dependent Variable: Ozone Max
## ------------------------------------------
## Random Effect Model Fixed Effect Model
## --------------------------------------------------------------------------
## USDM.categoricalModerateDrought 0.123*** 1.972
## (0.044) (1.199)
##
## USDM.categoricalSevereDrought -0.287*** 4.580**
## (0.069) (2.293)
##
## elevation 0.006*** 0.009***
## (0.001) (0.001)
##
## Longitude 0.213*** 0.384***
## (0.067) (0.107)
##
## Latitude -0.043 0.301
## (0.110) (0.185)
##
## tdmean -0.478*** 0.016
## (0.005) (0.293)
##
## tmean 0.711*** 0.470**
## (0.004) (0.208)
##
## ppt -0.046*** -0.317
## (0.004) (0.742)
##
## Constant 52.635*** 53.151***
## (5.044) (8.711)
##
## --------------------------------------------------------------------------
## Model Name Random Effect Model Fixed Effect Model
## Observations 226,906 94
## R2 0.230 0.795
## Adjusted R2 0.230 0.775
## F Statistic 55,811.320*** 41.085*** (df = 8; 85)
## ==========================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
nw<- combinedAir.final%>%
filter(noaa_region=="northwest")
nw_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =nw,
index = c("MonitorID","Year","month"),
model = "random")
nw_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =nw,
index = c("MonitorID","Year","month"),
model = "between")
stargazer(nw_random,nw_fix,type = "text", title = "Northwest", align = TRUE,
add.lines = list(c("Model Name", "Random Effect Model", "Fixed Effect Model")),
column.labels = c("Random Effect Model", "Fixed Effect Model"),
dep.var.caption = "Dependent Variable: Ozone Max",
dep.var.labels.include = FALSE,
omit.table.layout = "#")
##
## Northwest
## ==========================================================================
## Dependent Variable: Ozone Max
## ------------------------------------------
## Random Effect Model Fixed Effect Model
## --------------------------------------------------------------------------
## USDM.categoricalModerateDrought -0.396*** -0.023
## (0.073) (2.136)
##
## USDM.categoricalSevereDrought -2.017*** 6.229
## (0.167) (5.737)
##
## elevation 0.003*** 0.007***
## (0.001) (0.002)
##
## Longitude 0.298* 0.568**
## (0.154) (0.275)
##
## Latitude -0.321 -0.061
## (0.218) (0.324)
##
## tdmean -1.320*** -0.578
## (0.011) (0.424)
##
## tmean 1.320*** 1.600***
## (0.008) (0.259)
##
## ppt 0.152*** 1.072**
## (0.005) (0.411)
##
## Constant 76.315*** 83.933**
## (18.593) (38.752)
##
## --------------------------------------------------------------------------
## Model Name Random Effect Model Fixed Effect Model
## Observations 105,338 58
## R2 0.207 0.834
## Adjusted R2 0.207 0.806
## F Statistic 24,962.300*** 30.669*** (df = 8; 49)
## ==========================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
ohv<- combinedAir.final%>%
filter(noaa_region=="ohio_valley")
ohv_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =ohv,
index = c("MonitorID","Year","month"),
model = "random")
ohv_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =ohv,
index = c("MonitorID","Year","month"),
model = "between")
stargazer(ohv_random,ohv_fix,type = "text", title = "Ohio Valley", align = TRUE,
add.lines = list(c("Model Name", "Random Effect Model", "Fixed Effect Model")),
column.labels = c("Random Effect Model", "Fixed Effect Model"),
dep.var.caption = "Dependent Variable: Ozone Max",
dep.var.labels.include = FALSE,
omit.table.layout = "#")
##
## Ohio Valley
## ===========================================================================
## Dependent Variable: Ozone Max
## -------------------------------------------
## Random Effect Model Fixed Effect Model
## ---------------------------------------------------------------------------
## USDM.categoricalModerateDrought 0.322*** 2.873
## (0.038) (1.963)
##
## USDM.categoricalSevereDrought -0.640*** 6.632
## (0.090) (8.185)
##
## elevation 0.008*** 0.007***
## (0.001) (0.002)
##
## Longitude 0.225*** 0.260***
## (0.038) (0.056)
##
## Latitude -0.559*** -0.310***
## (0.064) (0.112)
##
## tdmean -1.589*** 1.816***
## (0.005) (0.391)
##
## tmean 2.199*** -0.411
## (0.005) (0.361)
##
## ppt -0.143*** -1.788***
## (0.001) (0.503)
##
## Constant 64.365*** 69.282***
## (4.545) (8.129)
##
## ---------------------------------------------------------------------------
## Model Name Random Effect Model Fixed Effect Model
## Observations 1,006,480 342
## R2 0.280 0.632
## Adjusted R2 0.280 0.623
## F Statistic 374,606.500*** 71.415*** (df = 8; 333)
## ===========================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
sth<- combinedAir.final%>%
filter(noaa_region=="south")
sth_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =sth,
index = c("MonitorID","Year","month"),
model = "random")
sth_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =sth,
index = c("MonitorID","Year","month"),
model = "between")
stargazer(sth_random,sth_fix,type = "text", title = "South", align = TRUE,
add.lines = list(c("Model Name", "Random Effect Model", "Fixed Effect Model")),
column.labels = c("Random Effect Model", "Fixed Effect Model"),
dep.var.caption = "Dependent Variable: Ozone Max",
dep.var.labels.include = FALSE,
omit.table.layout = "#")
##
## South
## ===========================================================================
## Dependent Variable: Ozone Max
## -------------------------------------------
## Random Effect Model Fixed Effect Model
## ---------------------------------------------------------------------------
## USDM.categoricalModerateDrought 0.001 0.224
## (0.031) (1.852)
##
## USDM.categoricalSevereDrought -0.378*** 2.677
## (0.047) (2.701)
##
## elevation -0.005*** 0.007***
## (0.001) (0.003)
##
## Longitude 0.498*** 0.259*
## (0.070) (0.142)
##
## Latitude 0.954*** 1.153***
## (0.061) (0.123)
##
## tdmean -1.345*** 0.023
## (0.004) (0.245)
##
## tmean 1.774*** 1.008***
## (0.004) (0.242)
##
## ppt -0.079*** 0.250
## (0.001) (0.547)
##
## Constant 41.099*** 5.479
## (7.322) (17.967)
##
## ---------------------------------------------------------------------------
## Model Name Random Effect Model Fixed Effect Model
## Observations 951,486 236
## R2 0.220 0.440
## Adjusted R2 0.220 0.420
## F Statistic 257,802.400*** 22.278*** (df = 8; 227)
## ===========================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
se<- combinedAir.final%>%
filter(noaa_region=="southeast")
se_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =se,
index = c("MonitorID","Year","month"),
model = "random")
se_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =se,
index = c("MonitorID","Year","month"),
model = "between")
stargazer(se_random,se_fix,type = "text", title = "Southeast", align = TRUE,
add.lines = list(c("Model Name", "Random Effect Model", "Fixed Effect Model")),
column.labels = c("Random Effect Model", "Fixed Effect Model"),
dep.var.caption = "Dependent Variable: Ozone Max",
dep.var.labels.include = FALSE,
omit.table.layout = "#")
##
## Southeast
## ===========================================================================
## Dependent Variable: Ozone Max
## -------------------------------------------
## Random Effect Model Fixed Effect Model
## ---------------------------------------------------------------------------
## USDM.categoricalModerateDrought 2.394*** 1.693
## (0.031) (1.940)
##
## USDM.categoricalSevereDrought 3.188*** 19.841***
## (0.046) (2.637)
##
## elevation 0.008*** 0.006***
## (0.001) (0.001)
##
## Longitude -0.010 -0.031
## (0.049) (0.065)
##
## Latitude 0.599*** 1.054***
## (0.044) (0.075)
##
## tdmean -2.057*** 0.368
## (0.005) (0.334)
##
## tmean 2.347*** 0.456
## (0.005) (0.333)
##
## ppt -0.079*** -0.848**
## (0.001) (0.394)
##
## Constant 2.786 -9.244
## (4.772) (6.480)
##
## ---------------------------------------------------------------------------
## Model Name Random Effect Model Fixed Effect Model
## Observations 982,391 273
## R2 0.212 0.690
## Adjusted R2 0.212 0.681
## F Statistic 252,128.100*** 73.575*** (df = 8; 264)
## ===========================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
sw<- combinedAir.final%>%
filter(noaa_region=="southwest")
sw_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =sw,
index = c("MonitorID","Year","month"),
model = "random")
sw_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =sw,
index = c("MonitorID","Year","month"),
model = "between")
stargazer(sw_random,sw_fix,type = "text", title = "Southwest", align = TRUE,
add.lines = list(c("Model Name", "Random Effect Model", "Fixed Effect Model")),
column.labels = c("Random Effect Model", "Fixed Effect Model"),
dep.var.caption = "Dependent Variable: Ozone Max",
dep.var.labels.include = FALSE,
omit.table.layout = "#")
##
## Southwest
## ===========================================================================
## Dependent Variable: Ozone Max
## -------------------------------------------
## Random Effect Model Fixed Effect Model
## ---------------------------------------------------------------------------
## USDM.categoricalModerateDrought 0.184*** 1.490
## (0.028) (1.464)
##
## USDM.categoricalSevereDrought 1.158*** -1.674
## (0.035) (1.592)
##
## elevation 0.006*** 0.006***
## (0.0003) (0.001)
##
## Longitude -0.335*** -0.287**
## (0.075) (0.123)
##
## Latitude 0.517*** 0.473***
## (0.070) (0.117)
##
## tdmean -0.353*** -0.574***
## (0.002) (0.184)
##
## tmean 0.953*** 1.165***
## (0.002) (0.126)
##
## ppt 0.018*** 1.548**
## (0.004) (0.663)
##
## Constant -31.579*** -29.743***
## (8.642) (11.375)
##
## ---------------------------------------------------------------------------
## Model Name Random Effect Model Fixed Effect Model
## Observations 683,530 223
## R2 0.343 0.593
## Adjusted R2 0.343 0.578
## F Statistic 342,623.700*** 39.007*** (df = 8; 214)
## ===========================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
um<- combinedAir.final%>%
filter(noaa_region=="upper_midwest")
um_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =um,
index = c("MonitorID","Year","month"),
model = "random")
um_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =um,
index = c("MonitorID","Year","month"),
model = "between")
stargazer(um_random,um_fix,type = "text", title = "Upper Midwest", align = TRUE,
add.lines = list(c("Model Name", "Random Effect Model", "Fixed Effect Model")),
column.labels = c("Random Effect Model", "Fixed Effect Model"),
dep.var.caption = "Dependent Variable: Ozone Max",
dep.var.labels.include = FALSE,
omit.table.layout = "#")
##
## Upper Midwest
## ===========================================================================
## Dependent Variable: Ozone Max
## -------------------------------------------
## Random Effect Model Fixed Effect Model
## ---------------------------------------------------------------------------
## USDM.categoricalModerateDrought -0.377*** -7.331
## (0.056) (4.706)
##
## USDM.categoricalSevereDrought -1.766*** 6.445
## (0.187) (19.508)
##
## elevation 0.002 0.009*
## (0.003) (0.004)
##
## Longitude 0.278*** 0.292***
## (0.065) (0.103)
##
## Latitude -0.335** 0.284
## (0.148) (0.207)
##
## tdmean -1.415*** 2.199***
## (0.007) (0.509)
##
## tmean 1.741*** -0.880*
## (0.007) (0.448)
##
## ppt -0.080*** -1.293
## (0.002) (0.912)
##
## Constant 67.945*** 50.717***
## (8.117) (11.589)
##
## ---------------------------------------------------------------------------
## Model Name Random Effect Model Fixed Effect Model
## Observations 382,355 128
## R2 0.182 0.592
## Adjusted R2 0.182 0.565
## F Statistic 81,562.780*** 21.591*** (df = 8; 119)
## ===========================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
wst<- combinedAir.final%>%
filter(noaa_region=="upper_midwest")
wst_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =wst,
index = c("MonitorID","Year","month"),
model = "random")
wst_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude+tdmean+tmean+ppt,
data =wst,
index = c("MonitorID","Year","month"),
model = "between")
stargazer(wst_random,wst_fix,type = "text", title = "West", align = TRUE,
add.lines = list(c("Model Name", "Random Effect Model", "Fixed Effect Model")),
column.labels = c("Random Effect Model", "Fixed Effect Model"),
dep.var.caption = "Dependent Variable: Ozone Max",
dep.var.labels.include = FALSE,
omit.table.layout = "#")
##
## West
## ===========================================================================
## Dependent Variable: Ozone Max
## -------------------------------------------
## Random Effect Model Fixed Effect Model
## ---------------------------------------------------------------------------
## USDM.categoricalModerateDrought -0.377*** -7.331
## (0.056) (4.706)
##
## USDM.categoricalSevereDrought -1.766*** 6.445
## (0.187) (19.508)
##
## elevation 0.002 0.009*
## (0.003) (0.004)
##
## Longitude 0.278*** 0.292***
## (0.065) (0.103)
##
## Latitude -0.335** 0.284
## (0.148) (0.207)
##
## tdmean -1.415*** 2.199***
## (0.007) (0.509)
##
## tmean 1.741*** -0.880*
## (0.007) (0.448)
##
## ppt -0.080*** -1.293
## (0.002) (0.912)
##
## Constant 67.945*** 50.717***
## (8.117) (11.589)
##
## ---------------------------------------------------------------------------
## Model Name Random Effect Model Fixed Effect Model
## Observations 382,355 128
## R2 0.182 0.592
## Adjusted R2 0.182 0.565
## F Statistic 81,562.780*** 21.591*** (df = 8; 119)
## ===========================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01