load("Ozone Data with Region (1).RData")
df4$USDM.categorical<-factor(df4$USDM.categorical,levels=c("NoDrought","ModerateDrought","SevereDrought"))
df4$modest<-ifelse(df4$USDM.categorical=="ModerateDrought",1,0)
df4$severe<-ifelse(df4$USDM.categorical=="SevereDrought",1,0)
#1. Unadjust
Una<-felm(Max.Ozone~modest+severe+elevation|GEOID + Year+month | 0|GEOID,
data=df4)
#2. Ajusted
Ajd<-felm(Max.Ozone~modest+severe+elevation+Longitude+Latitude |GEOID + Year+month | 0 |GEOID,
data=df4)
#3. Full Adjust
Fajd<-felm(Max.Ozone~modest+severe+elevation+tdmean+tmean+ppt+Longitude+Latitude |GEOID + Year+month | 0 |GEOID,
data=df4)
stargazer(Una,Ajd,Fajd,type="text",title = "Compare County",align = TRUE,
column.labels = c("Unadjust Model","Adjust Model","Full Adjust Model"),
dep.var.caption = "Dependent Variable: Max Ozone",
dep.var.labels.include = FALSE,omit.table.layout = "#")
##
## Compare County
## =====================================================================================
## Dependent Variable: Max Ozone
## -----------------------------------------------------------------
## Unadjust Model Adjust Model Full Adjust Model
## -------------------------------------------------------------------------------------
## modest 1.693*** 1.693*** 1.075***
## (0.106) (0.106) (0.109)
##
## severe 2.599*** 2.598*** 1.358***
## (0.163) (0.163) (0.176)
##
## elevation 0.006*** 0.006*** 0.007***
## (0.001) (0.001) (0.001)
##
## tdmean -0.723***
## (0.055)
##
## tmean 0.934***
## (0.063)
##
## ppt -0.148***
## (0.008)
##
## Longitude 0.059 -1.336
## (0.884) (1.048)
##
## Latitude 0.663 -0.491
## (1.367) (1.601)
##
## -------------------------------------------------------------------------------------
## Observations 6,589,427 6,589,427 6,589,427
## R2 0.333 0.333 0.397
## Adjusted R2 0.333 0.333 0.397
## Residual Std. Error 11.896 (df = 6588472) 11.895 (df = 6588470) 11.304 (df = 6588467)
## =====================================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
#1. Dewpoint
Dew<-felm(Max.Ozone~elevation+tdmean+Longitude+Latitude|GEOID + Year+month | 0|GEOID,
data=df4)
#2. Temperature
Temp<-felm(Max.Ozone~elevation+tmean+Longitude+Latitude |GEOID + Year+month | 0 |GEOID,
data=df4)
#3. Precipitation
prep<-felm(Max.Ozone~ppt+Longitude+Latitude |GEOID + Year+month | 0 |GEOID,
data=df4)
#4. All Enviroment
AEnv<-felm(Max.Ozone~elevation+tdmean+tmean+ppt+Longitude+Latitude |GEOID + Year+month | 0 |GEOID,
data=df4)
stargazer(AEnv,Dew,Temp,prep,type="text",title = "Compare Enviroment County",align = TRUE,
column.labels = c("All Enviroment","Dewpoint","Temperature","Precipitation"),
dep.var.caption = "Dependent Variable: Max Ozone",
dep.var.labels.include = FALSE,omit.table.layout = "#")
##
## Compare Enviroment County
## ===========================================================================================================
## Dependent Variable: Max Ozone
## ---------------------------------------------------------------------------------------
## All Enviroment Dewpoint Temperature Precipitation
## -----------------------------------------------------------------------------------------------------------
## elevation 0.007*** 0.005*** 0.008***
## (0.001) (0.001) (0.001)
##
## tdmean -0.733*** -0.257***
## (0.056) (0.023)
##
## tmean 0.945*** 0.370***
## (0.063) (0.025)
##
## ppt -0.148*** -0.237***
## (0.008) (0.006)
##
## Longitude -1.336 -0.097 -0.257 1.066
## (1.050) (0.917) (0.890) (1.168)
##
## Latitude -0.499 0.293 0.651 1.416
## (1.604) (1.395) (1.384) (1.658)
##
## -----------------------------------------------------------------------------------------------------------
## Observations 6,589,427 6,589,427 6,589,427 6,589,427
## R2 0.396 0.338 0.342 0.343
## Adjusted R2 0.396 0.338 0.342 0.343
## Residual Std. Error 11.314 (df = 6588469) 11.846 (df = 6588471) 11.811 (df = 6588471) 11.806 (df = 6588472)
## ===========================================================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
#1. MonitorID
MonL<-felm(Max.Ozone~modest+severe+elevation+Longitude+Latitude|MonitorID + Year+month | 0|MonitorID,
data=df4)
stargazer(MonL,type="text",align = TRUE,
column.labels = c("MonitorID"),
dep.var.caption = "Dependent Variable: Max Ozone",
dep.var.labels.include = FALSE,omit.table.layout = "#")
##
## =================================================
## Dependent Variable: Max Ozone
## -----------------------------
## MonitorID
## -------------------------------------------------
## modest 1.633***
## (0.057)
##
## severe 2.484***
## (0.088)
##
## elevation 0.004*
## (0.002)
##
## Longitude -3.329*
## (1.752)
##
## Latitude 1.880
## (5.068)
##
## -------------------------------------------------
## Observations 6,589,427
## R2 0.352
## Adjusted R2 0.352
## Residual Std. Error 11.723 (df = 6587434)
## =================================================
## Note: *p<0.1; **p<0.05; ***p<0.01
#2. Trend
tred<-felm(Max.Ozone~modest+severe+elevation+poly(Longitude,Latitude,degree = 2,raw = T)|GEOID + Year+month | 0 |GEOID,
data=df4)
stargazer(tred,type="text",align = TRUE,
column.labels = c("Trend"),
dep.var.caption = "Dependent Variable: Max Ozone",
dep.var.labels.include = FALSE,omit.table.layout = "#")
##
## ===============================================================================
## Dependent Variable: Max Ozone
## -----------------------------
## Trend
## -------------------------------------------------------------------------------
## modest 1.694***
## (0.107)
##
## severe 2.600***
## (0.164)
##
## elevation 0.006***
## (0.001)
##
## poly(Longitude, Latitude, degree = 2, raw = T)1.0 0.833
## (5.528)
##
## poly(Longitude, Latitude, degree = 2, raw = T)2.0 0.008
## (0.021)
##
## poly(Longitude, Latitude, degree = 2, raw = T)0.1 9.465
## (8.544)
##
## poly(Longitude, Latitude, degree = 2, raw = T)1.1 0.028
## (0.062)
##
## poly(Longitude, Latitude, degree = 2, raw = T)0.2 -0.080
## (0.100)
##
## -------------------------------------------------------------------------------
## Observations 6,589,427
## R2 0.333
## Adjusted R2 0.333
## Residual Std. Error 11.895 (df = 6588467)
## ===============================================================================
## Note: *p<0.1; **p<0.05; ***p<0.01