Dataset

#Load Ozone Dataset
load("Ozone_Drought_Final.RData")
combinedAir.final<-arrange(combinedAir.final,GEOID,Year)

#Load Population Dataset
region<-read.csv("region_code.csv")

## Merging dataset
combinedAir.final$State.Code<-as.numeric(combinedAir.final$State.Code)

combinedAir.final<-left_join(combinedAir.final,region,by="State.Code")

combinedAir.final$USDM.categorical<-factor(combinedAir.final$USDM.categorical,levels=c("NoDrought","ModerateDrought","SevereDrought"))

## Subset Between May 1st to Sep 31st.
combinedAir.final$month<-as.numeric(combinedAir.final$month)

combinedAir.final<-combinedAir.final%>%
  filter(month>=5 & month<=9)

## Sampling 20%
s.combined <- combinedAir.final %>%
  group_by(USDM.categorical, month, Year)

s.combined<-data.frame(s.combined)

All Region

md2_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =s.combined,
                index = c("GEOID","Year","month"),
                model = "random")

md2_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =s.combined,
                index = c("GEOID","Year","month"),
                effect = "twoway")


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      2.313***                  2.036***           
##                                       (0.019)                  (0.019)            
##                                                                                   
## USDM.categoricalSevereDrought        2.608***                  2.652***           
##                                       (0.027)                  (0.028)            
##                                                                                   
## elevation                            0.004***                  0.004***           
##                                      (0.0001)                  (0.0001)           
##                                                                                   
## Longitude                             -0.009                  -0.412***           
##                                       (0.013)                  (0.044)            
##                                                                                   
## Latitude                             0.299***                  1.157***           
##                                       (0.034)                  (0.061)            
##                                                                                   
## Constant                             31.497***                                    
##                                       (1.746)                                     
##                                                                                   
## ----------------------------------------------------------------------------------
## Model Name                      Random Effect Model       Fixed Effect Model      
## Observations                         3,437,966                3,437,966           
## R2                                     0.010                    0.007             
## Adjusted R2                            0.010                    0.007             
## F Statistic                        25,216.030***    4,731.343*** (df = 5; 3437021)
## ==================================================================================
## Note:                                                  *p<0.1; **p<0.05; ***p<0.01

Northeast

ne<- s.combined%>%
  filter(noaa_region=="northeast")

ne_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =ne,
                index = c("GEOID","Year","month"),
                model = "random")

ne_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =ne,
                index = c("GEOID","Year","month"),
                effect = "twoway")

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      1.167***                  1.744***           
##                                       (0.033)                  (0.036)            
##                                                                                   
## USDM.categoricalSevereDrought         -0.048                   1.786***           
##                                       (0.046)                  (0.052)            
##                                                                                   
## elevation                            0.004***                  0.004***           
##                                      (0.0001)                  (0.0001)           
##                                                                                   
## Longitude                            -0.199***                -0.850***           
##                                       (0.024)                  (0.060)            
##                                                                                   
## Latitude                             0.400***                  0.926***           
##                                       (0.069)                  (0.088)            
##                                                                                   
## Constant                             10.161***                                    
##                                       (3.531)                                     
##                                                                                   
## ----------------------------------------------------------------------------------
## Model Name                      Random Effect Model       Fixed Effect Model      
## Observations                         1,078,521                1,078,521           
## R2                                     0.007                    0.007             
## Adjusted R2                            0.007                    0.006             
## F Statistic                        5,461.626***     1,452.726*** (df = 5; 1078267)
## ==================================================================================
## Note:                                                  *p<0.1; **p<0.05; ***p<0.01

Northern Rockies

nr<- s.combined%>%
  filter(noaa_region=="northern_rockies")

nr_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =nr,
                index = c("GEOID","Year","month"),
                model = "random")

nr_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =nr,
                index = c("GEOID","Year","month"),
                effect = "twoway")

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      2.194***                1.673***          
##                                       (0.055)                 (0.057)          
##                                                                                
## USDM.categoricalSevereDrought        1.823***                1.664***          
##                                       (0.078)                 (0.080)          
##                                                                                
## elevation                            0.003***                0.003***          
##                                      (0.0002)                (0.0002)          
##                                                                                
## Longitude                            -0.271***               -2.799***         
##                                       (0.037)                 (0.163)          
##                                                                                
## Latitude                             1.163***                3.498***          
##                                       (0.091)                 (0.193)          
##                                                                                
## Constant                            -21.556***                                 
##                                       (5.850)                                  
##                                                                                
## -------------------------------------------------------------------------------
## Model Name                      Random Effect Model     Fixed Effect Model     
## Observations                          508,409                 508,409          
## R2                                     0.009                   0.004           
## Adjusted R2                            0.009                   0.003           
## F Statistic                        2,169.532***     380.349*** (df = 5; 508276)
## ===============================================================================
## Note:                                               *p<0.1; **p<0.05; ***p<0.01

Northwest

nw<- s.combined%>%
  filter(noaa_region=="northwest")

nw_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =nw,
                index = c("GEOID","Year","month"),
                model = "random")

nw_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =nw,
                index = c("GEOID","Year","month"),
                effect = "twoway")

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      3.562***                2.865***          
##                                       (0.078)                 (0.084)          
##                                                                                
## USDM.categoricalSevereDrought        5.816***                5.483***          
##                                       (0.095)                 (0.109)          
##                                                                                
## elevation                            0.009***                0.012***          
##                                       (0.001)                 (0.001)          
##                                                                                
## Longitude                            0.268***                 -0.391           
##                                       (0.043)                 (0.269)          
##                                                                                
## Latitude                             0.810***                 -0.218           
##                                       (0.187)                 (0.306)          
##                                                                                
## Constant                             36.573***                                 
##                                       (8.160)                                  
##                                                                                
## -------------------------------------------------------------------------------
## Model Name                      Random Effect Model     Fixed Effect Model     
## Observations                          136,648                 136,648          
## R2                                     0.048                   0.023           
## Adjusted R2                            0.048                   0.023           
## F Statistic                        4,814.888***     641.742*** (df = 5; 136589)
## ===============================================================================
## Note:                                               *p<0.1; **p<0.05; ***p<0.01

Ohio Valley

ohv<- s.combined%>%
  filter(noaa_region=="ohio_valley")

ohv_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =ohv,
                index = c("GEOID","Year","month"),
                model = "random")

ohv_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =ohv,
                index = c("GEOID","Year","month"),
                effect = "twoway")

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      3.540***                 2.979***           
##                                       (0.062)                  (0.064)           
##                                                                                  
## USDM.categoricalSevereDrought        6.365***                 5.534***           
##                                       (0.098)                  (0.103)           
##                                                                                  
## elevation                            0.011***                 0.013***           
##                                      (0.0003)                 (0.0003)           
##                                                                                  
## Longitude                            -0.219***                  0.124            
##                                       (0.035)                  (0.218)           
##                                                                                  
## Latitude                               0.009                  -1.419***          
##                                       (0.057)                  (0.233)           
##                                                                                  
## Constant                             18.981***                                   
##                                       (3.926)                                    
##                                                                                  
## ---------------------------------------------------------------------------------
## Model Name                      Random Effect Model      Fixed Effect Model      
## Observations                          321,492                  321,492           
## R2                                     0.032                    0.020            
## Adjusted R2                            0.032                    0.020            
## F Statistic                        8,384.959***     1,307.445*** (df = 5; 321372)
## =================================================================================
## Note:                                                 *p<0.1; **p<0.05; ***p<0.01

South

sth<- s.combined%>%
  filter(noaa_region=="south")

sth_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =sth,
                index = c("GEOID","Year","month"),
                model = "random")

sth_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =sth,
                index = c("GEOID","Year","month"),
                effect = "twoway")

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      2.366***                1.399***          
##                                       (0.101)                 (0.106)          
##                                                                                
## USDM.categoricalSevereDrought        5.486***                4.086***          
##                                       (0.168)                 (0.186)          
##                                                                                
## elevation                            0.006***                0.008***          
##                                       (0.001)                 (0.001)          
##                                                                                
## Longitude                            0.215***                -6.059***         
##                                       (0.024)                 (0.747)          
##                                                                                
## Latitude                              0.124*                 -8.950***         
##                                       (0.067)                 (0.789)          
##                                                                                
## Constant                             57.301***                                 
##                                       (2.721)                                  
##                                                                                
## -------------------------------------------------------------------------------
## Model Name                      Random Effect Model     Fixed Effect Model     
## Observations                          150,132                 150,132          
## R2                                     0.020                   0.005           
## Adjusted R2                            0.020                   0.005           
## F Statistic                        1,548.579***     154.016*** (df = 5; 150053)
## ===============================================================================
## Note:                                               *p<0.1; **p<0.05; ***p<0.01

Southeast

se<- s.combined%>%
  filter(noaa_region=="southeast")

se_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =se,
                index = c("GEOID","Year","month"),
                model = "random")

se_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =se,
                index = c("GEOID","Year","month"),
                effect = "twoway")

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.438***                1.740***          
##                                       (0.067)                 (0.071)          
##                                                                                
## USDM.categoricalSevereDrought        4.581***                2.944***          
##                                       (0.100)                 (0.107)          
##                                                                                
## elevation                            0.002***                0.003***          
##                                      (0.0001)                (0.0001)          
##                                                                                
## Longitude                             -0.013                  -0.115           
##                                       (0.028)                 (0.182)          
##                                                                                
## Latitude                             -0.197***               0.848***          
##                                       (0.069)                 (0.296)          
##                                                                                
## Constant                             50.543***                                 
##                                       (3.289)                                  
##                                                                                
## -------------------------------------------------------------------------------
## Model Name                      Random Effect Model     Fixed Effect Model     
## Observations                          227,263                 227,263          
## R2                                     0.033                   0.007           
## Adjusted R2                            0.033                   0.006           
## F Statistic                        3,352.360***     302.022*** (df = 5; 227162)
## ===============================================================================
## Note:                                               *p<0.1; **p<0.05; ***p<0.01

Southwest

sw<- s.combined%>%
  filter(noaa_region=="southwest")

sw_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =sw,
                index = c("GEOID","Year","month"),
                model = "random")

sw_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =sw,
                index = c("GEOID","Year","month"),
                effect = "twoway")

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      3.440***                1.270***         
##                                       (0.094)                (0.095)          
##                                                                               
## USDM.categoricalSevereDrought        4.845***                2.183***         
##                                       (0.240)                (0.246)          
##                                                                               
## elevation                            0.004***                0.006***         
##                                       (0.001)                (0.001)          
##                                                                               
## Longitude                             -0.001                 0.786**          
##                                       (0.054)                (0.332)          
##                                                                               
## Latitude                              0.430**                 1.026*          
##                                       (0.204)                (0.543)          
##                                                                               
## Constant                             28.019**                                 
##                                      (11.698)                                 
##                                                                               
## ------------------------------------------------------------------------------
## Model Name                      Random Effect Model     Fixed Effect Model    
## Observations                          237,515                237,515          
## R2                                     0.016                  0.001           
## Adjusted R2                            0.016                  0.001           
## F Statistic                        1,680.433***     53.421*** (df = 5; 237427)
## ==============================================================================
## Note:                                              *p<0.1; **p<0.05; ***p<0.01

Upper Midwest

um<- s.combined%>%
  filter(noaa_region=="upper_midwest")

um_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =um,
                index = c("GEOID","Year","month"),
                model = "random")

um_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =um,
                index = c("GEOID","Year","month"),
                effect = "twoway")

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      5.869***                3.120***          
##                                       (0.075)                 (0.080)          
##                                                                                
## USDM.categoricalSevereDrought        6.495***                2.490***          
##                                       (0.111)                 (0.124)          
##                                                                                
## elevation                            -0.001***               -0.002***         
##                                      (0.0004)                (0.0004)          
##                                                                                
## Longitude                             -0.010                  1.366**          
##                                       (0.082)                 (0.667)          
##                                                                                
## Latitude                             0.587***                -4.527***         
##                                       (0.168)                 (0.804)          
##                                                                                
## Constant                             25.253***                                 
##                                       (6.719)                                  
##                                                                                
## -------------------------------------------------------------------------------
## Model Name                      Random Effect Model     Fixed Effect Model     
## Observations                          243,183                 243,183          
## R2                                     0.046                   0.007           
## Adjusted R2                            0.046                   0.006           
## F Statistic                        8,214.292***     327.011*** (df = 5; 243063)
## ===============================================================================
## Note:                                               *p<0.1; **p<0.05; ***p<0.01

West

wst<- s.combined%>%
  filter(noaa_region=="upper_midwest")

wst_random<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =wst,
                index = c("GEOID","Year","month"),
                model = "random")

wst_fix<-plm(Max.Ozone~USDM.categorical +elevation+ Longitude + Latitude,
                data =wst,
                index = c("GEOID","Year","month"),
                effect = "twoway")

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      5.869***                3.120***          
##                                       (0.075)                 (0.080)          
##                                                                                
## USDM.categoricalSevereDrought        6.495***                2.490***          
##                                       (0.111)                 (0.124)          
##                                                                                
## elevation                            -0.001***               -0.002***         
##                                      (0.0004)                (0.0004)          
##                                                                                
## Longitude                             -0.010                  1.366**          
##                                       (0.082)                 (0.667)          
##                                                                                
## Latitude                             0.587***                -4.527***         
##                                       (0.168)                 (0.804)          
##                                                                                
## Constant                             25.253***                                 
##                                       (6.719)                                  
##                                                                                
## -------------------------------------------------------------------------------
## Model Name                      Random Effect Model     Fixed Effect Model     
## Observations                          243,183                 243,183          
## R2                                     0.046                   0.007           
## Adjusted R2                            0.046                   0.006           
## F Statistic                        8,214.292***     327.011*** (df = 5; 243063)
## ===============================================================================
## Note:                                               *p<0.1; **p<0.05; ***p<0.01