From agency.R code in ptaxsim Gitlab “The levy of each jurisdiction is reported by the Cook County Clerk’s Office. URL here: https://www.cookcountyclerkil.gov/service/tax-extension-and-rates
Tax system notes:
EAV from tax_bill() command is the EAV before exemptions are
removed. Think of it like the “starting point” before it is manipulated
at all.
That is different than the EAV from the clerk office on PDFs
(which is after exemptions and tif increments)
Exemptions lower tax bills by reducing the equalized assessed
value of your property.
Taxing District tax levy / taxable value in the district =
District Tax Rate
Number of taxing districts includes any district which has levied
at some point in the past and has not been terminated by its governing
jurisdiction plus TIFs
Chicago general composite rate does not include special districts
such as mosquito abatement, special service areas, or home equity
assurance district
PTELL = Property Tax Extension Law Limit.
Assessed value as equalized (AVE) = (assessed value *
equalization factor)
People can appeal their assessed values (assessed value is 10% of
market value for residential)
Taxable Value of property = Equalized Assessed Value (EAV) = “assessed value as equalized”-exemptions
Goal: Estimate the revenue elasticity of the property tax base.
Theory: Revenue elasticity of the tax base might be equal to zero at least in expected value (all else being equal).
Need:
Taxable EAV for every taxing body in every year - comes from agency_info dt in ptaxsim. These values are after exemptions are deducted and exclude any eav above the frozen eav in any TIF tax codes. This is the taxable base.
Tax Levy for every taxing body in every year
Fixed Effect Model notes: you must set robust to either “HC1”, “HC2”, or “HC3” in order to have clustered standard errors. Stata and R have different defaults for robust standard errors so the adjusted R-squared and standard errors are different for coefficients if replicating in R vs Stata.
# has EAV values, extensions by agency_num
agency_dt <- DBI::dbGetQuery(
ptaxsim_db_conn,
"SELECT *
FROM agency
"
) %>%
mutate(first6 = str_sub(agency_num,1,6),
first5 = str_sub(agency_num,1,5)
) %>%
mutate(year = as.character(year))
# grabs all unique muni names. Would be needed if creating a loop for calculating all munis
# municipality names and their agency number
muni_agency_names <- DBI::dbGetQuery(
ptaxsim_db_conn,
"SELECT DISTINCT agency_num, agency_name, minor_type
FROM agency_info
WHERE minor_type = 'MUNI'
OR agency_num = '020060000'
"
) %>%
mutate(first6 = str_sub(agency_num,1,6),
first5 = str_sub(agency_num,1,5)
) %>%
select(-minor_type)
# took from one of Josh files. Made pivot table of his agencies and their triad
# then saved the info as a csv on my computer named muni_agency_triads
triads <- read_csv("muni_agency_triads.csv")
# has binary variable for if it was a reassessment year or not.
# Manually created based on the 3 year rotation used for reassessments.
reassessment_years <- read_csv("triad_reassessment_years.csv")
reassessments_long <- reassessment_years %>% pivot_longer(cols = c(`2006`:`2021`), names_to = "year", values_to = "reassess_year")
# all_taxing_agencies %>% filter(minor_type == "TOWNSHIP")
# North <- c("020010000", "020070000", "020080000", "020090000", "020110000","020130000", "020140000", "020150000", "020160000","020170000", "020200000", "020260000", "020290000" )
#
# South <- c("020020000", "020030000","020040000","020050000", "020060000", "020100000", "020120000", "020180000", "020190000", "020210000", "020220000", "020230000","020240000", "020250000", "020270000", "020280000", "020300000")
#
# # Chicago townships include Hyde Park, Jefferson, Lake, Lakeview, North Chicago, Rogers Park, South Chicago, West Chicago.
# Chicago <- c("030210000")
#
# muni_agency_names <- muni_agency_names %>%
# mutate(agency_num = as.character(agency_num) )%>%
# mutate(
# triad = ifelse(agency_num %in% North, "North", "")) %>%
# mutate(
# triad = ifelse(agency_num %in% South, "South", triad),
# triad = ifelse(agency_num %in% Chicago, "Chicago", triad))
muni_agency_names <- muni_agency_names %>% left_join(triads)
table(muni_agency_names$triad)
##
## City North South
## 1 43 82
# all agency names, numbers, and types
# includes TIF and non-TIF agencies
all_taxing_agencies <- DBI::dbGetQuery(
ptaxsim_db_conn,
"SELECT agency_num, agency_name, major_type, minor_type
FROM agency_info
"
)
all_taxing_agencies <- all_taxing_agencies %>%
mutate(first6 = str_sub(agency_num,1,6),
first5 = str_sub(agency_num,1,5)
)
all_taxing_agencies <- all_taxing_agencies %>%
left_join(muni_agency_names, by = c("first6", "first5")) %>%
rename(muni_name = agency_name.y,
muni_num = agency_num.y,
agency_name = agency_name.x,
agency_num = agency_num.x)
agency_dt <- left_join(agency_dt, all_taxing_agencies, by = c("agency_num", "first5", "first6"))
agency_dt <- left_join(agency_dt, reassessments_long, by = c("triad" = "Triad", "year"))
agency_dt <- left_join( agency_dt, pct_res)
# add taxing agency names and agency type to data table that has eav and extension values
agency_data <- agency_dt %>%
#right_join(agency_dt, all_taxing_agencies, by = c("first6", "first5", "agency_num") ) %>%
mutate(first2 = str_sub(agency_num, 1,2),
last2 = str_sub(agency_num,8,9),
in_SSA = ifelse(minor_type == "SSA", 1,0),
in_chicago = ifelse(str_detect(agency_name, "CHICAGO"),1,0)) %>%
select(-c(cty_dupage_eav:cty_livingston_eav))
agency_data <- agency_data %>%
mutate(cty_cook_eav = as.numeric(cty_cook_eav), # EAV after exemptions
total_final_levy = as.numeric(total_final_levy), # value that matches Clerk Office PDF for Levy
cty_cook_eav = ifelse(cty_cook_eav < 1, NA, cty_cook_eav), # Code as missing so Log() doesn't make -Inf
total_final_levy = ifelse(total_final_levy <1, NA, total_final_levy)) %>%
mutate(log_eav = log(cty_cook_eav),
log_levy = log(total_final_levy))
Simple model was log(levy) ~ log(base) where each observation is an agency-year and the base is the sum of that jurisdiction’s taxable eav. (The taxable eav = equalized assessed value - TIF increments - exemptions)
The coefficients would be interpreted as “a x% change in eav leads to a y% change in levy”, which is also the elasticity.
plm() uses the entity-demeaned OLS algorithm and does not report dummy coefficients.
robust has multiple options: HC0 to HC5. Default is set to “HC3 BUT Stata default is to use”HC1”
Command and package author site for summ() and table formatting
model = “within” is the same as creating dummies for all agencies
# tax base = log(levy)
# estimate the fixed effects regression with plm()
library(dplyr)
panel_data <- agency_data %>%
mutate(year =as.factor(year)) %>%
filter(minor_type!="TIF") %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy,# total_final_rate,
# triad, reassess_year,
home_rule_ind )
class(panel_data)
## [1] "data.frame"
panel_data <- pdata.frame(panel_data, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
panel_data$eav_lag1 <- plm::lag(panel_data$log_eav, 1)
panel_data$eav_lag2 <- plm::lag(panel_data$log_eav, 2)
#panel_data$reassess_lag1 <- plm::lag(panel_data$reassess_year, 1)
#panel_data$reassess_lag2 <- plm::lag(panel_data$reassess_year, 2)
#write_csv(panel_data, "alltaxingagencies_paneldata_july20.csv")
all_agencies <- panel_data
is.pbalanced(all_agencies)
## [1] FALSE
#all_agencies_balanced <- make.pbalanced(all_agencies)
# All Agencies-Agency & Year FE"
all_m1_simple<- plm(log_levy ~ log_eav,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = all_agencies)
all_m1_lags<- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2,
na.action = "na.exclude",
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = all_agencies)
summary(all_m1_lags)
## Twoways effects Within Model
##
## Call:
## plm(formula = log_levy ~ log_eav + eav_lag1 + eav_lag2, data = all_agencies,
## na.action = "na.exclude", effect = "twoways", model = "within",
## index = c("agency_name", "year"))
##
## Unbalanced Panel: n = 965, T = 1-14, N = 11565
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -7.836547 -0.038426 0.000000 0.043046 2.084286
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## log_eav 0.172780 0.023156 7.4615 9.223e-14 ***
## eav_lag1 0.123061 0.027249 4.5161 6.366e-06 ***
## eav_lag2 0.028056 0.022663 1.2380 0.2158
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 418.36
## Residual Sum of Squares: 406.04
## R-Squared: 0.029461
## Adj. R-Squared: -0.060403
## F-statistic: 107.095 on 3 and 10584 DF, p-value: < 2.22e-16
all_m1<- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = all_agencies)
model_names <- c( all_m1_simple = "All Agencies FE, Naive", all_m1_lags = "Lagged EAV FE"#,#
# all_m1 = "All Agencies-Lags & HR Ind"#, "All Agencies, All variables"
)
export_summs(all_m1_simple, all_m1_lags,# all_m1, #, all_m1_all_vars,
robust = "HC3", model.names = model_names, statistics = c(N = "nobs", adj.R2 = "adj.r.squared", R2 = "r.squared"))
| All Agencies FE, Naive | Lagged EAV FE | |
|---|---|---|
| log_eav | 0.30 *** | 0.17 *** |
| (0.01) | (0.02) | |
| eav_lag1 | 0.12 *** | |
| (0.03) | ||
| eav_lag2 | 0.03 | |
| (0.02) | ||
| N | 13516 | 11565 |
| adj.R2 | -0.05 | -0.06 |
| R2 | 0.03 | 0.03 |
| Standard errors are heteroskedasticity robust. *** p < 0.001; ** p < 0.01; * p < 0.05. | ||
Before the added variables, there were 13,516 observations for All agencies. Now there are 5,735 when all variables are included (drops observations if variables for the model are missing.)
all_m1_all_vars<- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2 + reassess_year + reassess_lag2 + reassess_lag2 + triad,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = all_agencies)
summary(all_m1_all_vars)
If you only want the 134 municipalities within Cook County, then use minor_type == MUNI. We probably want this.
Major_type == Muni includes things paid for by the municipality but separately such as library, health, muni, township, and general assistance taxing agencies.
library(dplyr)
minortype_munis <- agency_data %>%
filter(minor_type == "MUNI" | agency_name == "TOWN CICERO") %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy, # total_final_rate,
triad, reassess_year,
home_rule_ind )
minortype_munis <- pdata.frame(minortype_munis, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
minortype_munis$eav_lag1 <- plm::lag(minortype_munis$log_eav, 1)
minortype_munis$eav_lag2 <- plm::lag(minortype_munis$log_eav, 2)
minortype_munis$reassess_lag1 <- plm::lag(minortype_munis$reassess_year, 1)
minortype_munis$reassess_lag2 <- plm::lag(minortype_munis$reassess_year, 2)
minortype_munis$eav_lead1 <- plm::lead(minortype_munis$log_eav, 1)
minortype_munis$eav_lead2 <- plm::lead(minortype_munis$log_eav,2)
#%>%
# select(year, agency_name, agency_num, major_type, minor_type,
# cty_cook_eav, total_final_levy, log_eav, log_levy, total_final_rate, home_rule_ind,
# in_chicago, in_SSA, triad, reassess_year)
# minortype_munis <- pdata.frame(minortype_munis, index = c("agency_name", "year")) %>%
# # filter(agency_num %in% muni_agency_names$agency_num ) %>%
# mutate(eav_lag1 = dplyr::lag(log_eav, n = 1),
# eav_lag2 = dplyr::lag(log_eav, n = 2),
# reassess_lag1 = dplyr::lag(reassess_year, n=1),
# reassess_lag2 = dplyr::lag(reassess_year, n=2)
#
# )
# write_csv(minortype_munis, "municpalities_paneldata_july18.csv")
muni_minor_simple <- plm(log_levy ~ log_eav,
# index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
muni_minor <- plm(log_levy ~ log_eav + eav_lag1 +eav_lag2,
# index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
#summary(muni_minor)
muni_minor_nolags <- plm(log_levy ~ log_eav + reassess_year +triad,
# index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
muni_minor_allvars <- plm(log_levy ~ log_eav + reassess_lag1 + reassess_lag2 + reassess_year +eav_lag1 +eav_lag2 +triad,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
export_summs(muni_minor_simple, muni_minor, muni_minor_nolags, muni_minor_allvars, statistics = c(N = "nobs",adj.R2 = "adj.r.squared", R2 = "r.squared"))
| Model 1 | Model 2 | Model 3 | Model 4 | |
|---|---|---|---|---|
| log_eav | 0.02 | 0.07 | -0.02 | 0.16 * |
| (0.05) | (0.06) | (0.05) | (0.08) | |
| eav_lag1 | 0.05 | 0.03 | ||
| (0.07) | (0.09) | |||
| eav_lag2 | -0.03 | -0.14 | ||
| (0.06) | (0.07) | |||
| reassess_year | 0.00 | |||
| (0.01) | ||||
| reassess_lag1 | -0.00 | |||
| (0.01) | ||||
| reassess_lag2 | 0.00 | |||
| (0.01) | ||||
| N | 2078 | 1822 | 1998 | 1752 |
| adj.R2 | -0.08 | -0.08 | -0.08 | -0.08 |
| R2 | 0.00 | 0.00 | 0.00 | 0.00 |
| *** p < 0.001; ** p < 0.01; * p < 0.05. | ||||
library(dplyr)
minortype_munis <- agency_data %>%
filter(minor_type == "MUNI" | agency_name == "TOWN CICERO") %>%
filter(home_rule_ind == 1) %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy, # total_final_rate,
triad, reassess_year,
home_rule_ind ) %>%
mutate(year = as.factor(year))
homerule_minortype_munis <- pdata.frame(minortype_munis, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
homerule_minortype_munis$eav_lag1 <- plm::lag(homerule_minortype_munis$log_eav, 1)
homerule_minortype_munis$eav_lag2 <- plm::lag(homerule_minortype_munis$log_eav, 2)
homerule_minortype_munis$reassess_lag1 <- plm::lag(homerule_minortype_munis$reassess_year, 1)
homerule_minortype_munis$reassess_lag2 <- plm::lag(homerule_minortype_munis$reassess_year, 2)
hr_muni_minor_simple <- plm(log_levy ~ log_eav,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = homerule_minortype_munis)
hr_muni_minor <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2,# + reassess_year,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = homerule_minortype_munis)
summary(hr_muni_minor)
## Twoways effects Within Model
##
## Call:
## plm(formula = log_levy ~ log_eav + eav_lag1 + eav_lag2, data = homerule_minortype_munis,
## effect = "twoways", model = "within", index = c("agency_name",
## "year"))
##
## Unbalanced Panel: n = 86, T = 1-14, N = 1153
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -1.78556228 -0.06049156 -0.00023214 0.06037927 0.60953388
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## log_eav 0.102424 0.059453 1.7228 0.08522 .
## eav_lag1 0.083021 0.068329 1.2150 0.22464
## eav_lag2 -0.100598 0.058560 -1.7179 0.08612 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 18.282
## Residual Sum of Squares: 18.126
## R-Squared: 0.0085654
## Adj. R-Squared: -0.08671
## F-statistic: 3.02668 on 3 and 1051 DF, p-value: 0.028694
Homerule Munis - No Chicago
Excludes Chicago to see if coefficients change at all and to see if Chicago is colinear with triads and causing triad variable to be dropped.
library(dplyr)
homerule_minortype_munis <- agency_data %>%
filter(minor_type == "MUNI" | agency_name == "TOWN CICERO") %>%
filter(home_rule_ind == 1 & triad != "City") %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy,
triad, reassess_year,
home_rule_ind )
homerule_minortype_munis <- pdata.frame(homerule_minortype_munis, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
homerule_minortype_munis$eav_lag1 <- plm::lag(homerule_minortype_munis$log_eav, 1)
homerule_minortype_munis$eav_lag2 <- plm::lag(homerule_minortype_munis$log_eav, 2)
homerule_minortype_munis$reassess_lag1 <- plm::lag(homerule_minortype_munis$reassess_year, 1)
homerule_minortype_munis$reassess_lag2 <- plm::lag(homerule_minortype_munis$reassess_year, 2)
homerule_minortype_munis$eav_lead1 <- plm::lead(homerule_minortype_munis$log_eav, 1)
homerule_minortype_munis$eav_lead2 <- plm::lead(homerule_minortype_munis$log_eav,2)
homerule_minortype_munis_nochi <- homerule_minortype_munis
nochi_hr_muni_minor_simple <- plm(log_levy ~ log_eav,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = homerule_minortype_munis_nochi)
summary(nochi_hr_muni_minor_simple)
## Twoways effects Within Model
##
## Call:
## plm(formula = log_levy ~ log_eav, data = homerule_minortype_munis_nochi,
## effect = "twoways", model = "within", index = c("agency_name",
## "year"))
##
## Unbalanced Panel: n = 82, T = 3-16, N = 1255
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -1.7832307 -0.0636051 -0.0024286 0.0636387 0.6307787
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## log_eav 0.0070755 0.0509999 0.1387 0.8897
##
## Total Sum of Squares: 21.522
## Residual Sum of Squares: 21.522
## R-Squared: 1.6635e-05
## Adj. R-Squared: -0.083819
## F-statistic: 0.0192475 on 1 and 1157 DF, p-value: 0.88968
nochi_hr_muni_minor1 <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2,#+ reassess_year + reassess_lag2+reassess_lag1,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = homerule_minortype_munis_nochi)
#summary(nochi_hr_muni_minor1)
nochi_hr_muni_minor2 <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2 + reassess_year + reassess_lag2+reassess_lag1,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = homerule_minortype_munis_nochi)
#summary(nochi_hr_muni_minor2)
# homerule_minortype_munis %>%
# ggplot()+
# geom_point(aes(x=log(cty_cook_eav), y=log(total_final_levy), col=agency_name), alpha=.5) +
# theme(legend.position="none")+
# ggtitle("Homerule Muni: Logged EAV vs Logged Levy")
#
#
model_names <- c("All Munis", "Simple Homerule Muni", "Lagged Homerule Muni",
"Simple No Chi", "No Chi-Lagged", "No Chi"
)
export_summs(muni_minor_simple ,hr_muni_minor_simple, hr_muni_minor, nochi_hr_muni_minor_simple, nochi_hr_muni_minor1, nochi_hr_muni_minor2, model.names = model_names, statistics = c(N = "nobs", adj.R2 = "adj.r.squared", R2 = "r.squared"))
| All Munis | Simple Homerule Muni | Lagged Homerule Muni | Simple No Chi | No Chi-Lagged | No Chi | |
|---|---|---|---|---|---|---|
| log_eav | 0.02 | 0.03 | 0.10 | 0.01 | 0.20 ** | 0.21 ** |
| (0.05) | (0.04) | (0.06) | (0.05) | (0.08) | (0.08) | |
| eav_lag1 | 0.08 | 0.09 | 0.08 | |||
| (0.07) | (0.09) | (0.09) | ||||
| eav_lag2 | -0.10 | -0.25 ** | -0.24 ** | |||
| (0.06) | (0.08) | (0.08) | ||||
| reassess_year | -0.01 | |||||
| (0.01) | ||||||
| reassess_lag2 | -0.00 | |||||
| (0.01) | ||||||
| N | 2078 | 1319 | 1153 | 1255 | 1097 | 1097 |
| adj.R2 | -0.08 | -0.08 | -0.09 | -0.08 | -0.08 | -0.08 |
| R2 | 0.00 | 0.00 | 0.01 | 0.00 | 0.02 | 0.02 |
| *** p < 0.001; ** p < 0.01; * p < 0.05. | ||||||
library(dplyr)
minortype_munis <- agency_data %>%
filter(minor_type == "MUNI" | agency_name == "TOWN CICERO") %>%
filter(agency_num %in% muni_agency_names$agency_num &
home_rule_ind==0 ) %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy, # total_final_rate,
triad, reassess_year,
home_rule_ind )
minortype_munis <- pdata.frame(minortype_munis, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
minortype_munis$eav_lag1 <- plm::lag(minortype_munis$log_eav, 1)
minortype_munis$eav_lag2 <- plm::lag(minortype_munis$log_eav, 2)
minortype_munis$reassess_lag1 <- plm::lag(minortype_munis$reassess_year, 1)
minortype_munis$reassess_lag2 <- plm::lag(minortype_munis$reassess_year, 2)
minortype_munis$eav_lead1 <- plm::lead(minortype_munis$log_eav, 1)
minortype_munis$eav_lead2 <- plm::lead(minortype_munis$log_eav,2)
non_homerule_munis <- minortype_munis
nonhr_muni_minor_simple <- plm(log_levy ~ log_eav,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = non_homerule_munis)
nonhr_muni_minor <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2, #+ reassess_year + reassess_lag1 + reassess_lag2 + triad ,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = non_homerule_munis)
#summary(nonhr_muni_minor_simple)
#summary(nonhr_muni_minor)
model_names <- c("Naive All Taxing Agencies","All Taxing Agencies w/ Lag EAV",
"Naive All Municipalities", "All Municipalities",# "All Munis 2",
"Simple Homerule Muni", "Homerule Muni",
"Simple Non-homerule Muni", "Non-homerule Munis"
)
# "Simple Homerule Muni - No Chicago", "Homerule General Muni - No Chicago",
# nochi_hr_muni_minor_simple, nochi_hr_muni_minor,
export_summs(all_m1_simple, all_m1_lags,# all_m1,
muni_minor_simple, muni_minor,# muni_minor_nolags,
hr_muni_minor_simple, hr_muni_minor,
nonhr_muni_minor_simple, nonhr_muni_minor,
model.names = model_names, statistics = c(N = "nobs", adj.R2 = "adj.r.squared", R2 = "r.squared"))
| Naive All Taxing Agencies | All Taxing Agencies w/ Lag EAV | Naive All Municipalities | All Municipalities | Simple Homerule Muni | Homerule Muni | Simple Non-homerule Muni | Non-homerule Munis | |
|---|---|---|---|---|---|---|---|---|
| log_eav | 0.30 *** | 0.17 *** | 0.02 | 0.07 | 0.03 | 0.10 | 0.06 | -0.07 |
| (0.01) | (0.02) | (0.05) | (0.06) | (0.04) | (0.06) | (0.10) | (0.14) | |
| eav_lag1 | 0.12 *** | 0.05 | 0.08 | 0.01 | ||||
| (0.03) | (0.07) | (0.07) | (0.16) | |||||
| eav_lag2 | 0.03 | -0.03 | -0.10 | 0.22 | ||||
| (0.02) | (0.06) | (0.06) | (0.13) | |||||
| N | 13516 | 11565 | 2078 | 1822 | 1319 | 1153 | 759 | 657 |
| adj.R2 | -0.05 | -0.06 | -0.08 | -0.08 | -0.08 | -0.09 | -0.09 | -0.10 |
| R2 | 0.03 | 0.03 | 0.00 | 0.00 | 0.00 | 0.01 | 0.00 | 0.01 |
| *** p < 0.001; ** p < 0.01; * p < 0.05. | ||||||||
major_type == “MUNICIPALITY/TOWNSHIP” includes items provided by the municipality but a different taxing agency associated with the “Village of..” or “City of..”.
Need to decide if this matters: Stick with the true minor_type=MUNI or combine major_type=MUNICIPALITY taxing agencies using the first 5 or 6 digits of the taxing agency? Probably the first option but just checking.
nonhr_muni_minor <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2 + reassess_year + reassess_lag1 + reassess_lag2 + triad ,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = non_homerule_munis)
model_names <- c("Naive All Taxing Agencies","All Taxing Agencies w/ Lag EAV",
"Naive All Municipalities", "All Municipalities",# "All Munis 2",
"Simple Homerule Muni", "Homerule Muni", "No Chicago-HR Munis", "No Chi-HR Munis",
"Simple Non-homerule Muni", "Non-homerule Munis"
)
# "Simple Homerule Muni - No Chicago", "Homerule General Muni - No Chicago",
# nochi_hr_muni_minor_simple, nochi_hr_muni_minor,
export_summs(all_m1_simple, #all_m1_lags,
all_m1,
muni_minor_simple, muni_minor,# muni_minor_nolags,
hr_muni_minor_simple, hr_muni_minor, nochi_hr_muni_minor1, nochi_hr_muni_minor2,
nonhr_muni_minor_simple, nonhr_muni_minor,
model.names = model_names, statistics = c(N = "nobs", adj.R2 = "adj.r.squared", R2 = "r.squared"))
| Naive All Taxing Agencies | All Taxing Agencies w/ Lag EAV | Naive All Municipalities | All Municipalities | Simple Homerule Muni | Homerule Muni | No Chicago-HR Munis | No Chi-HR Munis | Simple Non-homerule Muni | Non-homerule Munis | |
|---|---|---|---|---|---|---|---|---|---|---|
| log_eav | 0.30 *** | 0.17 *** | 0.02 | 0.07 | 0.03 | 0.10 | 0.20 ** | 0.21 ** | 0.06 | -0.00 |
| (0.01) | (0.02) | (0.05) | (0.06) | (0.04) | (0.06) | (0.08) | (0.08) | (0.10) | (0.18) | |
| eav_lag1 | 0.12 *** | 0.05 | 0.08 | 0.09 | 0.08 | -0.09 | ||||
| (0.03) | (0.07) | (0.07) | (0.09) | (0.09) | (0.20) | |||||
| eav_lag2 | 0.03 | -0.03 | -0.10 | -0.25 ** | -0.24 ** | 0.10 | ||||
| (0.02) | (0.06) | (0.06) | (0.08) | (0.08) | (0.17) | |||||
| reassess_year | -0.01 | 0.01 | ||||||||
| (0.01) | (0.03) | |||||||||
| reassess_lag2 | -0.00 | |||||||||
| (0.01) | ||||||||||
| reassess_lag1 | 0.00 | |||||||||
| (0.03) | ||||||||||
| N | 13516 | 11565 | 2078 | 1822 | 1319 | 1153 | 1097 | 1097 | 759 | 629 |
| adj.R2 | -0.05 | -0.06 | -0.08 | -0.08 | -0.08 | -0.09 | -0.08 | -0.08 | -0.09 | -0.12 |
| R2 | 0.03 | 0.03 | 0.00 | 0.00 | 0.00 | 0.01 | 0.02 | 0.02 | 0.00 | 0.00 |
| *** p < 0.001; ** p < 0.01; * p < 0.05. | ||||||||||
library(dplyr)
schools <- agency_data %>%
filter(major_type == "SCHOOL") %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy,
home_rule_ind )
schools <- pdata.frame(schools, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
schools$eav_lag1 <- plm::lag(schools$log_eav, 1)
schools$eav_lag2 <- plm::lag(schools$log_eav, 2)
# based on major_type == Schools. Groups all schools together.
school_mod_major_simple <- plm(log_levy ~ log_eav , index = c("agency_name", "year"),
model = "within", effect= "twoways", data = schools)
school_mod_major <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2 , index = c("agency_name", "year"),
model = "within", effect= "twoways", data = schools)
school_mod_secondary_simple <- plm(log_levy ~ log_eav,
subset = minor_type == "SECONDARY",
index = c("agency_name", "year"), model = "within",
effect= "twoways", data = schools)
school_mod_secondary <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2,
subset = minor_type == "SECONDARY",
index = c("agency_name", "year"), model = "within",
effect= "twoways", data = schools)
school_mod_unified <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2,
subset = minor_type == "UNIFIED",
index = c("agency_name", "year"), model = "within",
effect= "twoways", data = schools)
school_mod_elementary <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2,
subset = minor_type == "ELEMENTARY",
index = c("agency_name", "year"), model = "within",
effect= "twoways", data = schools)
school_mod_elementary_simple <- plm(log_levy ~ log_eav,
subset = minor_type == "ELEMENTARY",
index = c("agency_name", "year"), model = "within",
effect= "twoways", data = schools)
school_mod_comcol <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2, index = c("agency_name", "year"),
subset = minor_type == "COMM COLL", model = "within",
effect= "twoways", data = schools)
model_names = c("All Schools", "All Schools", "Secondary", "Elementary", "Elementary", "Com. Colleges", "Unified" )
export_summs(school_mod_major_simple, school_mod_major,
school_mod_secondary,
school_mod_elementary_simple, school_mod_elementary,
school_mod_comcol, school_mod_unified,
model.names = model_names, robust=TRUE, statistics = c(N = "nobs", adjR2 = "adj.r.squared"))
| All Schools | All Schools | Secondary | Elementary | Elementary | Com. Colleges | Unified | |
|---|---|---|---|---|---|---|---|
| log_eav | 0.30 *** | 0.27 *** | 0.20 *** | 0.36 *** | 0.33 *** | -0.03 | 0.03 |
| (0.02) | (0.02) | (0.05) | (0.02) | (0.03) | (0.09) | (0.04) | |
| eav_lag1 | 0.09 ** | -0.00 | 0.07 * | -0.12 | 0.17 * | ||
| (0.03) | (0.06) | (0.03) | (0.09) | (0.08) | |||
| eav_lag2 | 0.03 | 0.11 * | 0.05 | 0.01 | 0.01 | ||
| (0.02) | (0.05) | (0.03) | (0.09) | (0.07) | |||
| N | 2648 | 2314 | 406 | 1888 | 1652 | 154 | 84 |
| adjR2 | 0.07 | 0.09 | -0.02 | 0.13 | 0.16 | -0.17 | -0.05 |
| Standard errors are heteroskedasticity robust. *** p < 0.001; ** p < 0.01; * p < 0.05. | |||||||
All minor type munis (hr and non-hr). Also drops Chicago from model.
library(dplyr)
minortype_munis <- agency_data %>%
filter(clean_name!= "Chicago") %>%
filter(minor_type == "MUNI" | agency_name == "TOWN CICERO") %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy,
triad, reassess_year, home_rule_ind, perc_residential )
minortype_munis <- pdata.frame(minortype_munis, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
minortype_munis$eav_lag1 <- plm::lag(minortype_munis$log_eav, 1)
minortype_munis$eav_lag2 <- plm::lag(minortype_munis$log_eav, 2)
minortype_munis$reassess_lag1 <- plm::lag(minortype_munis$reassess_year, 1)
minortype_munis$reassess_lag2 <- plm::lag(minortype_munis$reassess_year, 2)
minortype_munis$eav_lead1 <- plm::lead(minortype_munis$log_eav, 1)
minortype_munis$eav_lead2 <- plm::lead(minortype_munis$log_eav,2)
muni_minor_simple <- plm(log_levy ~ log_eav,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
muni_minor <- plm(log_levy ~ log_eav + eav_lag1 +eav_lag2,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
#summary(muni_minor)
muni_minor_nolags <- plm(log_levy ~ log_eav + reassess_year +triad + perc_residential+ home_rule_ind,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
muni_minor_allvars <- plm(log_levy ~ log_eav + reassess_lag1 + reassess_lag2 + reassess_year +eav_lag1 +eav_lag2 + home_rule_ind + triad + perc_residential ,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
export_summs(muni_minor_simple, muni_minor, muni_minor_nolags, muni_minor_allvars, statistics = c(N = "nobs", adj.R2 = "adj.r.squared", R2 = "r.squared"))
| Model 1 | Model 2 | Model 3 | Model 4 | |
|---|---|---|---|---|
| log_eav | -0.00 | 0.05 | -0.04 | 0.15 |
| (0.05) | (0.06) | (0.05) | (0.08) | |
| eav_lag1 | 0.05 | 0.02 | ||
| (0.07) | (0.09) | |||
| eav_lag2 | -0.04 | -0.15 * | ||
| (0.06) | (0.08) | |||
| reassess_year | 0.00 | |||
| (0.01) | ||||
| home_rule_ind | 0.22 *** | 0.12 ** | ||
| (0.04) | (0.04) | |||
| reassess_lag1 | -0.00 | |||
| (0.01) | ||||
| reassess_lag2 | 0.00 | |||
| (0.01) | ||||
| N | 2046 | 1794 | 1966 | 1724 |
| adj.R2 | -0.08 | -0.09 | -0.06 | -0.08 |
| R2 | 0.00 | 0.00 | 0.02 | 0.01 |
| *** p < 0.001; ** p < 0.01; * p < 0.05. | ||||
Home rule municipalities with additional variables:
library(dplyr)
minortype_munis <- agency_data %>%
filter(clean_name!= "Chicago" &
home_rule_ind ==1) %>%
filter(minor_type == "MUNI" | agency_name == "TOWN CICERO") %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy,
triad, reassess_year, home_rule_ind, perc_residential )
minortype_munis <- pdata.frame(minortype_munis, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
minortype_munis$eav_lag1 <- plm::lag(minortype_munis$log_eav, 1)
minortype_munis$eav_lag2 <- plm::lag(minortype_munis$log_eav, 2)
minortype_munis$reassess_lag1 <- plm::lag(minortype_munis$reassess_year, 1)
minortype_munis$reassess_lag2 <- plm::lag(minortype_munis$reassess_year, 2)
minortype_munis$eav_lead1 <- plm::lead(minortype_munis$log_eav, 1)
minortype_munis$eav_lead2 <- plm::lead(minortype_munis$log_eav,2)
muni_minor_simple <- plm(log_levy ~ log_eav,
# index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
muni_minor <- plm(log_levy ~ log_eav + eav_lag1 +eav_lag2,
# index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
#summary(muni_minor)
muni_minor_nolags <- plm(log_levy ~ log_eav + reassess_year + triad + perc_residential+ reassess_lag1 + reassess_lag2,
# index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
muni_minor_allvars <- plm(log_levy ~ log_eav + reassess_lag1 + reassess_lag2 + reassess_year + eav_lag1 +eav_lag2 + home_rule_ind + triad + perc_residential,# + eav_lead1+eav_lead2 ,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
export_summs(muni_minor_simple, muni_minor, muni_minor_nolags, muni_minor_allvars, model.names = c("HR Muni Simple", "HR Muni Lags", "HR Muni Other Vars", "HR Muni All Vars"), statistics = c(N = "nobs", adj.R2 = "adj.r.squared", R2 = "r.squared"))
| HR Muni Simple | HR Muni Lags | HR Muni Other Vars | HR Muni All Vars | |
|---|---|---|---|---|
| log_eav | 0.00 | 0.09 | 0.13 * | 0.21 ** |
| (0.04) | (0.06) | (0.06) | (0.08) | |
| eav_lag1 | 0.08 | 0.08 | ||
| (0.07) | (0.09) | |||
| eav_lag2 | -0.12 * | -0.25 ** | ||
| (0.06) | (0.08) | |||
| reassess_year | -0.00 | |||
| (0.01) | ||||
| reassess_lag1 | 0.01 | 0.01 | ||
| (0.01) | (0.01) | |||
| reassess_lag2 | 0.01 | |||
| (0.01) | ||||
| N | 1287 | 1125 | 1083 | 1083 |
| adj.R2 | -0.08 | -0.09 | -0.09 | -0.08 |
| R2 | 0.00 | 0.01 | 0.01 | 0.02 |
| *** p < 0.001; ** p < 0.01; * p < 0.05. | ||||
Non-homerule municipalities:
library(dplyr)
minortype_munis <- agency_data %>%
filter(home_rule_ind ==0) %>%
filter(minor_type == "MUNI" | agency_name == "TOWN CICERO") %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy,
triad, reassess_year, perc_residential, perc_owned )
minortype_munis <- pdata.frame(minortype_munis, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
minortype_munis$eav_lag1 <- plm::lag(minortype_munis$log_eav, 1)
minortype_munis$eav_lag2 <- plm::lag(minortype_munis$log_eav, 2)
minortype_munis$reassess_lag1 <- plm::lag(minortype_munis$reassess_year, 1)
minortype_munis$reassess_lag2 <- plm::lag(minortype_munis$reassess_year, 2)
minortype_munis$eav_lead1 <- plm::lead(minortype_munis$log_eav, 1)
minortype_munis$eav_lead2 <- plm::lead(minortype_munis$log_eav,2)
muni_minor_simple <- plm(log_levy ~ log_eav,
# index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
muni_minor <- plm(log_levy ~ log_eav + eav_lag1 +eav_lag2,
# index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
#summary(muni_minor)
muni_minor_nolags <- plm(log_levy ~ log_eav + reassess_year + reassess_lag2 + reassess_lag1 + triad + perc_residential+perc_owned,
# index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
muni_minor_allvars <- plm(log_levy ~ log_eav + reassess_lag1 + reassess_lag2 + reassess_year +eav_lag1 +eav_lag2 + triad + perc_residential + perc_owned ,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = minortype_munis)
export_summs(muni_minor_simple, muni_minor, muni_minor_nolags, muni_minor_allvars, statistics = c(N = "nobs", adj.R2 = "adj.r.squared", R2 = "r.squared"))
| Model 1 | Model 2 | Model 3 | Model 4 | |
|---|---|---|---|---|
| log_eav | 0.06 | -0.07 | -0.01 | -0.00 |
| (0.10) | (0.14) | (0.12) | (0.18) | |
| eav_lag1 | 0.01 | -0.09 | ||
| (0.16) | (0.20) | |||
| eav_lag2 | 0.22 | 0.10 | ||
| (0.13) | (0.17) | |||
| reassess_year | 0.02 | |||
| (0.03) | ||||
| reassess_lag2 | 0.00 | -0.01 | ||
| (0.03) | (0.03) | |||
| reassess_lag1 | -0.01 | |||
| (0.03) | ||||
| N | 759 | 657 | 629 | 629 |
| adj.R2 | -0.09 | -0.10 | -0.11 | -0.12 |
| R2 | 0.00 | 0.01 | 0.00 | 0.00 |
| *** p < 0.001; ** p < 0.01; * p < 0.05. | ||||
All major type taxing agencies together.
library(dplyr)
major_munis <- agency_data %>%
filter(major_type == "MUNICIPALITY/TOWNSHIP" ) %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy, perc_owned, perc_residential,
triad, reassess_year, home_rule_ind )
major_munis <- pdata.frame(major_munis, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
major_munis$eav_lag1 <- plm::lag(major_munis$log_eav, 1)
major_munis$eav_lag2 <- plm::lag(major_munis$log_eav, 2)
major_munis$reassess_lag1 <- plm::lag(major_munis$reassess_year, 1)
major_munis$reassess_lag2 <- plm::lag(major_munis$reassess_year, 2)
major_munis_naive <- plm(log_levy ~ log_eav,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = major_munis)
major_munis_mod <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2 ,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = major_munis)
major_munis_mod_morevars <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2 +reassess_lag1 + reassess_lag2 + reassess_year + perc_residential + perc_owned ,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = major_munis)
summary(major_munis_mod_morevars)
## Twoways effects Within Model
##
## Call:
## plm(formula = log_levy ~ log_eav + eav_lag1 + eav_lag2 + reassess_lag1 +
## reassess_lag2 + reassess_year + perc_residential + perc_owned,
## data = major_munis, effect = "twoways", model = "within",
## index = c("agency_name", "year"))
##
## Unbalanced Panel: n = 125, T = 5-14, N = 1738
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -1.79562126 -0.05527172 0.00062559 0.05783964 0.83366701
##
## Coefficients: (1 dropped because of singularities)
## Estimate Std. Error t-value Pr(>|t|)
## log_eav 0.15596535 0.07579534 2.0577 0.03978 *
## eav_lag1 0.02524192 0.08589231 0.2939 0.76889
## eav_lag2 -0.13441067 0.07510444 -1.7897 0.07370 .
## reassess_lag1 -0.00087563 0.01087536 -0.0805 0.93584
## reassess_lag2 0.00131712 0.01119284 0.1177 0.90634
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 36.465
## Residual Sum of Squares: 36.304
## R-Squared: 0.0044126
## Adj. R-Squared: -0.084223
## F-statistic: 1.41387 on 5 and 1595 DF, p-value: 0.21619
library(dplyr)
homerule_majortype_munis <- agency_data %>%
mutate(year = as.factor(year)) %>%
filter(home_rule_ind==1 # Homerule only
) %>%
filter(major_type == "MUNICIPALITY/TOWNSHIP" ) %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy, perc_owned, perc_residential,
triad, reassess_year, home_rule_ind )
major_munis <- pdata.frame(homerule_majortype_munis, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
major_munis$eav_lag1 <- plm::lag(major_munis$log_eav, 1)
major_munis$eav_lag2 <- plm::lag(major_munis$log_eav, 2)
major_munis$reassess_lag1 <- plm::lag(major_munis$reassess_year, 1)
major_munis$reassess_lag2 <- plm::lag(major_munis$reassess_year, 2)
major_munis_naive <- plm(log_levy ~ log_eav,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = major_munis)
hr_muni_major <- plm(log_levy ~ log_eav+eav_lag1 + eav_lag2,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = major_munis)
summary(hr_muni_major)
## Twoways effects Within Model
##
## Call:
## plm(formula = log_levy ~ log_eav + eav_lag1 + eav_lag2, data = major_munis,
## effect = "twoways", model = "within", index = c("agency_name",
## "year"))
##
## Unbalanced Panel: n = 412, T = 1-14, N = 3983
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -2.78870250 -0.06349344 0.00064436 0.07780758 1.61826530
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## log_eav 0.266498 0.034616 7.6988 1.768e-14 ***
## eav_lag1 0.110123 0.041718 2.6397 0.008334 **
## eav_lag2 -0.015638 0.033917 -0.4611 0.644790
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 192.01
## Residual Sum of Squares: 180.81
## R-Squared: 0.05832
## Adj. R-Squared: -0.054787
## F-statistic: 73.3898 on 3 and 3555 DF, p-value: < 2.22e-16
hr_muni_major <- plm(log_levy ~ log_eav+eav_lag1 + eav_lag2 + reassess_year + reassess_lag2 + reassess_lag1 + triad + perc_owned + perc_residential,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = major_munis)
summary(hr_muni_major)
## Twoways effects Within Model
##
## Call:
## plm(formula = log_levy ~ log_eav + eav_lag1 + eav_lag2 + reassess_year +
## reassess_lag2 + reassess_lag1 + triad + perc_owned + perc_residential,
## data = major_munis, effect = "twoways", model = "within",
## index = c("agency_name", "year"))
##
## Unbalanced Panel: n = 82, T = 1-14, N = 1097
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -1.78863082 -0.06125384 -0.00028499 0.05942956 0.60377575
##
## Coefficients: (1 dropped because of singularities)
## Estimate Std. Error t-value Pr(>|t|)
## log_eav 0.2175273 0.0791191 2.7494 0.006079 **
## eav_lag1 0.0958478 0.0901510 1.0632 0.287952
## eav_lag2 -0.2177488 0.0798470 -2.7271 0.006502 **
## reassess_year -0.0049280 0.0113534 -0.4341 0.664340
## reassess_lag2 -0.0010096 0.0112244 -0.0899 0.928350
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Total Sum of Squares: 17.427
## Residual Sum of Squares: 17.14
## R-Squared: 0.016479
## Adj. R-Squared: -0.081182
## F-statistic: 3.34105 on 5 and 997 DF, p-value: 0.0053429
library(dplyr)
nonhr_muni_major <- agency_data %>%
mutate(year = as.factor(year)) %>%
filter(home_rule_ind==0 # Homerule only
) %>%
filter(major_type == "MUNICIPALITY/TOWNSHIP" ) %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy, perc_owned, perc_residential,
triad, reassess_year, home_rule_ind )
major_munis <- pdata.frame(nonhr_muni_major, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
major_munis$eav_lag1 <- plm::lag(major_munis$log_eav, 1)
major_munis$eav_lag2 <- plm::lag(major_munis$log_eav, 2)
major_munis$reassess_lag1 <- plm::lag(major_munis$reassess_year, 1)
major_munis$reassess_lag2 <- plm::lag(major_munis$reassess_year, 2)
nonhr_muni_maj <- plm(log_levy ~ log_eav + eav_lag1 + eav_lag2,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = major_munis)
summary(nonhr_muni_maj)
## Twoways effects Within Model
##
## Call:
## plm(formula = log_levy ~ log_eav + eav_lag1 + eav_lag2, data = major_munis,
## effect = "twoways", model = "within", index = c("agency_name",
## "year"))
##
## Unbalanced Panel: n = 156, T = 2-14, N = 2073
##
## Residuals:
## Min. 1st Qu. Median 3rd Qu. Max.
## -1.55296271 -0.04512087 -0.00011854 0.05095193 2.07910894
##
## Coefficients:
## Estimate Std. Error t-value Pr(>|t|)
## log_eav -0.048079 0.102116 -0.4708 0.6378
## eav_lag1 -0.059064 0.106638 -0.5539 0.5797
## eav_lag2 0.068012 0.093347 0.7286 0.4663
##
## Total Sum of Squares: 71.138
## Residual Sum of Squares: 71.101
## R-Squared: 0.00052758
## Adj. R-Squared: -0.089378
## F-statistic: 0.334486 on 3 and 1901 DF, p-value: 0.80042
majortype: Uses all taxing agencies that have a major_type == “MUNI/TOWNSHIP”. Includes many more taxing agencies than just the 134 muni taxing agencies. Split into homerule and nonhomerule.
Municipality models (minorType) use the 134 municipality taxing agencies from 2006-2021. Split into home rule and non homerule.
I wouldn’t use the last two models yet. Not all major Muni taxing agencies have home rule indicators so those all get dropped from the model. I haven’t had time to see what is kept and what is dropped.
model_names <- c("All Agencies", "All Major Muni Agencies - Simple", "All Major Muni Agencies", "Homerule Muni (MajorType)", "Non-homerule Muni (Major Type)"
)
# coefs <- c("","") # to make names nicer
export_summs(all_m1, major_munis_naive, major_munis_mod, hr_muni_major, nonhr_muni_maj, model.names = model_names, statistics = c(N = "nobs", R2 = "r.squared"))
| All Agencies | All Major Muni Agencies - Simple | All Major Muni Agencies | Homerule Muni (MajorType) | Non-homerule Muni (Major Type) | |
|---|---|---|---|---|---|
| log_eav | 0.17 *** | 0.35 *** | 0.24 *** | 0.22 ** | -0.05 |
| (0.02) | (0.02) | (0.03) | (0.08) | (0.10) | |
| eav_lag1 | 0.12 *** | 0.11 ** | 0.10 | -0.06 | |
| (0.03) | (0.04) | (0.09) | (0.11) | ||
| eav_lag2 | 0.03 | -0.01 | -0.22 ** | 0.07 | |
| (0.02) | (0.03) | (0.08) | (0.09) | ||
| reassess_year | -0.00 | ||||
| (0.01) | |||||
| reassess_lag2 | -0.00 | ||||
| (0.01) | |||||
| N | 11565 | 4820 | 6072 | 1097 | 2073 |
| R2 | 0.03 | 0.06 | 0.04 | 0.02 | 0.00 |
| *** p < 0.001; ** p < 0.01; * p < 0.05. | |||||
#export_summs(m1, m2, m3, model.names = model_names, scale=TRUE, robust = "HC1")
Does not separate home rule and non-homerule taxing agencies in the majortype_munis model.
majortype_munis_filtered excludes townships and SSAs so far.
library(dplyr)
# All Major Munis: removing SSAs and TOWNSHIPS
filtered_majortype_munis <- agency_data %>%
mutate(year = as.factor(year)) %>%
filter(major_type == "MUNICIPALITY/TOWNSHIP") %>%
filter(!(minor_type %in% c("TOWNSHIP", "SSA"))) %>%
select(year, agency_name, agency_num, major_type, minor_type,
cty_cook_eav, total_final_levy, log_eav, log_levy, perc_owned, perc_residential,
triad, reassess_year, home_rule_ind )
major_munis <- pdata.frame(filtered_majortype_munis, index = c("agency_name", "year"))
detach("package:dplyr", unload = TRUE)
major_munis$eav_lag1 <- plm::lag(major_munis$log_eav, 1)
major_munis$eav_lag2 <- plm::lag(major_munis$log_eav, 2)
majortype_munis_filtered <- plm(log_levy ~ log_eav,
index = c("agency_name", "year"),
model = "within", effect= "twoways",
data = major_munis)
The major type municipal Muni models above still include SSAs and
# Models for Major Muni types. Includes homerule and nonhomerule together!!
# one model removes SSAs and Townships (which is the better model. Included other for comparison.)
model_names <- c("All Taxing Agencies" ,#"All Munis (MajorType)",
"All Munis (MajorType) - Filtered"
)
# coefs <- c("","") # to make names nicer
export_summs(all_m1,# major_munis_mod,
majortype_munis_filtered,
model.names = model_names, statistics = c(N = "nobs", R2 = "r.squared"))
| All Taxing Agencies | All Munis (MajorType) - Filtered | |
|---|---|---|
| log_eav | 0.17 *** | -0.01 |
| (0.02) | (0.04) | |
| eav_lag1 | 0.12 *** | |
| (0.03) | ||
| eav_lag2 | 0.03 | |
| (0.02) | ||
| N | 11565 | 3844 |
| R2 | 0.03 | 0.00 |
| *** p < 0.001; ** p < 0.01; * p < 0.05. | ||
agency_data %>% ggplot()+
geom_point(aes(x=log(cty_cook_eav), y=log(total_final_levy), col=major_type, alpha=.1)) +
ggtitle("Logged EAV vs Logged Levy for ALL agencies and all years")
library(dplyr)
#adds cicero, drops chicago
agency_data %>%
filter(!(agency_num %in% c("030210000", "030210001", "030210002" ) )
& (minor_type == "MUNI" | agency_num =="020060000")) %>%
ggplot(aes(x=log(cty_cook_eav), y=log(total_final_levy), color=agency_name, group = agency_name))+
geom_point(alpha=.5) +
theme(legend.position = "none")+
labs(title = "Logged Values All Years: Municipality EAV & Levy")
agency_data %>%
filter(year == 2021) %>%
filter(!(agency_num %in% c("030210000", "030210001", "030210002" ) ) ) %>%
filter(minor_type == "MUNI" | agency_num == "020060000" | agency_name == "TOWN CICERO") %>%
ggplot(aes(x=cty_cook_eav, y=total_final_levy, col=triad, label = clean_name))+
geom_point()+
geom_text(size = 2, vjust=-1.5)
minortype_munis %>%
ggplot(aes(x=year,
y= cty_cook_eav,
group = agency_name,
color = triad
# color = reassess_year
) )+
geom_line(alpha = .1)+
labs(title = "134 Municipalities based on Minor Type: \nLogged EAVLogg/ed Levy Over Time \n Homerule & non-Homerule Together", caption = "Drops Chicago")
agency_data %>%
filter(!(agency_num %in% c("030210000", "030210001", "030210002" ) )
& (minor_type == "MUNI" | agency_num =="020060000")) %>%
filter(triad == "South")%>%
ggplot(aes(x=year,
y= cty_cook_eav,
group = clean_name,
# color = triad
# color = reassess_year
) )+
geom_line(alpha = .1)+
labs(title = "134 Municipalities based on Minor Type: \nLogged EAVLogg/ed Levy Over Time \n Homerule & non-Homerule Together", caption = "Drops Chicago")
https://www.econometrics-with-r.org/10-5-tferaaseffer.html
“Similar as for heteroskedasticity, autocorrelation invalidates the usual standard error formulas as well as heteroskedasticity-robust standard errors since these are derived under the assumption that there is no autocorrelation. When there is both heteroskedasticity and autocorrelation so-called heteroskedasticity and autocorrelation-consistent (HAC) standard errors need to be used. Clustered standard errors belong to these type of standard errors. They allow for heteroskedasticity and autocorrelated errors within an entity but not correlation across entities.
As shown in the examples throughout this chapter, it is fairly easy to specify usage of clustered standard errors in regression summaries produced by function like coeftest() in conjunction with vcovHC() from the package sandwich. Conveniently, vcovHC() recognizes panel model objects (objects of class plm) and computes clustered standard errors by default.”
The null hypothesis for the Breusch-Pagan test is homoskedasticity.
#bptest(log_levy~log_eav + factor(agency_num) + factor(year), data = balanced_panel)
Controlling for heteroskedasticity: Robust covariance matrix estimation (Sandwich estimator)
The vcovHC function estimates three
heteroskedasticity-consistent covariance estimators:
• “white1” - for general heteroskedasticity but no serial correlation.
Recommended for random effects.
• “white2” - is “white1” restricted to a common variance within groups.
Recommended for random effects.
• “arellano” - both heteroskedasticity and serial correlation.
Recommended for fixed effects.
#coeftest(m1)
#coeftest(m1, vcovHC(fixed, method = "arellano"))