-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathincentive_models_OLS.qmd
320 lines (245 loc) · 10 KB
/
incentive_models_OLS.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
---
title: "Models for Commercial & Industrial Properties in Cook County"
author: "MVH & AWM"
date: "July 23, 2024"
date-modified: "July 23, 2024"
format:
html:
code-fold: true
toc: true
toc-location: left
tbl-cap-location: top
fig-cap-location: top
df-print: paged
---
# Preliminary Code
```{r setup}
#| output: false
options(scipen = 999, digits = 4) #no scientific notation
# Load packages
library(tidyverse)
library(glue)
library(plm)
library(modelsummary)
comm_ind <- read_csv("./Output/comm_ind_PINs_2011-2022_balanced.csv")
comm_ind <- comm_ind |>
## set variable types
mutate(across(c(class, improvement_ind, has_AB_exemp, fmv_NA_indicator, in_tif), as.character))
comm_ind <- comm_ind |>
# Change to factors; set reference levels
mutate(incent_change = as.factor(incent_change),
landuse_change = as.factor(landuse_change),
triad = as.factor(Triad),
in_tif = as.factor(in_tif),
land_use = as.factor(land_use)) |>
mutate(incent_change = relevel(incent_change, ref = "Never Incentive"),
landuse_change = relevel(landuse_change, ref = "Always Commercial"),
triad = relevel(triad, ref = "North"),
land_use = relevel(land_use, ref = "Land")) |>
# Create binary variables
mutate(change_incent_bin = as.factor(ifelse(incent_change ==
"Changes Sometime", 1, 0)),
change_prop_use_bin = as.factor(ifelse(landuse_change ==
"Changes Land Use", 1, 0)),
is_chicago = as.factor(ifelse(clean_name == "Chicago", 1, 0))
) |>
# Rename for my sanity
rename(fmv_2011 = base_year_fmv_2011)
```
# OLS
## Variable of Interest: Incentive Classification Change
```{r time_filter}
#| include: false
df_2022 <- comm_ind |>
filter(year == 2022) |>
filter(!is.na(fmv_growth_2011))
```
#### Dependent Variable: 2011-2022 PIN FMV Growth ("Naive" Model)
```{r tbl-naive_model}
#| tbl-cap: "<b>2011-2022 PIN FMV Growth</b><br><i>Naive Model</i>"
naive_ols <- lm(fmv_growth_2011 ~ incent_change + change_prop_use_bin,
data = df_2022)
comm_coef_map <- c('incent_changeChanges Sometime' = '<b>Changed Incentive<b>',
'change_prop_use_bin1' = 'Changed Prop. Use',
'fmv_2011' = 'Base FMV (2011)',
'in_tif1' = 'TIF',
'triadCity' = 'City Triad',
'triadSouth' = "South Triad",
'triadNorth' = 'North Triad'
)
fit_format <- function(x) format(round(x, 2), big.mark=",")
fit <- list(
list("raw" = "nobs", "clean" = "N", "fmt" = fit_format),
list("raw" = "df", "clean" = "DF", "fmt" = fit_format),
list("raw" = "adj.r.squared", "clean" = "R2 Adj.", "fmt" = fit_format),
list("raw" = "F", "clean" = "F-stat.", "fmt" = fit_format),
list("raw" = "p.value", "clean" = "p-value", "fmt" = fit_format)
)
naive_summ <- modelsummary(naive_ols,
# title = 'Naive Model',
fmt = function(x) round(x, 2),
stars = TRUE,
coef_omit = 'clean_name',
coef_map = comm_coef_map,
gof_map = fit,
# note = 'All models include municipality-level control variables.'
)
naive_summ
```
#### Dependent Variable: 2011-2022 PIN FMV Growth (With Municipal Dummies)
```{r tbl-Table2}
#| tbl-cap: "<b>2011-2022 PIN FMV Growth</b><br><i>2022 Comm./Ind. PINs</i>"
muni_dummy_models <- list(
"(1)" <- lm(fmv_growth_2011 ~ change_incent_bin + clean_name,
data = df_2022),
"(2)" <- lm(fmv_growth_2011 ~ change_incent_bin + fmv_2011 + clean_name,
data = df_2022),
"(3)" <- lm(fmv_growth_2011 ~ change_incent_bin + fmv_2011 + triad
+ clean_name,
data = df_2022),
"(4)" <- lm(fmv_growth_2011 ~ change_incent_bin + fmv_2011 + triad
+ change_prop_use_bin + clean_name,
data = df_2022),
"(5)" <- lm(fmv_growth_2011 ~ change_incent_bin + fmv_2011 + triad
+ change_prop_use_bin + land_use + in_tif
+ clean_name,
data = df_2022),
"(6)" <- lm(fmv_growth_2011 ~ change_incent_bin + fmv_2011 + triad
+ change_prop_use_bin + land_use + in_tif
+ clean_name,
data = df_2022)
)
cfm <- c(#'incent_changeChanges Sometime' = 'Changed Incentive',
'change_incent_bin1' = '<b>Changed Incentive</b>',
'change_prop_use_bin1' = 'Changed Prop. Use',
'fmv_2011' = 'Base FMV (2011)',
'in_tif1' = 'TIF',
'triadCity' = 'City Triad',
'triadSouth' = "South Triad",
'triadNorth' = 'North Triad',
'land_useIndustrial' = 'Industrial',
'land_useCommercial' = 'Commercial',
'land_useLand' = 'Empty Land',
'land_useOther Residential' = 'Residential',
'land_useOwner Occupied' = 'Owner Occupied',
'land_useRental' = 'Rental'
)
fit_format <- function(x) format(round(x, 2), big.mark=",")
fit <- list(
list("raw" = "nobs", "clean" = "N", "fmt" = fit_format),
list("raw" = "df", "clean" = "DF", "fmt" = fit_format),
list("raw" = "adj.r.squared", "clean" = "R2 Adj.", "fmt" = fit_format),
list("raw" = "F", "clean" = "F-stat.", "fmt" = fit_format),
list("raw" = "p.value", "clean" = "p-value", "fmt" = fit_format)
)
muni_dummy_summ <- modelsummary(muni_dummy_models,
fmt = function(x) round(x, 2),
stars = TRUE,
coef_omit = 'clean_name',
coef_map = cfm,
gof_map = fit,
notes = 'All models include municipality-level control variables.'
)
muni_dummy_summ
```
```{r comm_data}
df_2022_comm <- df_2022 |>
filter(land_use == "Commercial")
```
#### Dependent Variable: 2011-2022 PIN FMV Growth (Commercial Subset)
```{r tbl-comm_models}
#| tbl-cap: "<b>2011-2022 PIN FMV Growth</b><br><i>2022 Commercial PINs</i>"
comm_models <- list(
"(1)" = lm(fmv_growth_2011 ~ incent_change + clean_name,
data = df_2022_comm),
"(2)" = lm(fmv_growth_2011 ~ incent_change + fmv_2011 + clean_name,
data = df_2022_comm),
"(3)" = lm(fmv_growth_2011 ~ incent_change + fmv_2011 + triad
+ clean_name,
data = df_2022_comm),
"(4)" = lm(fmv_growth_2011 ~ incent_change + fmv_2011 + triad
+ change_prop_use_bin + clean_name,
data = df_2022_comm),
"(5)" = lm(fmv_growth_2011 ~ incent_change + fmv_2011 + triad
+ change_prop_use_bin + in_tif
+ clean_name,
data = df_2022_comm)
)
comm_coef_map <- c('incent_changeChanges Sometime' = '<b>Changed Incentive</b>',
'change_prop_use_bin1' = 'Changed Prop. Use',
'fmv_2011' = 'Base FMV (2011)',
'in_tif1' = 'TIF',
'triadCity' = 'City Triad',
'triadSouth' = "South Triad",
'triadNorth' = 'North Triad'
)
fit_format <- function(x) format(round(x, 2), big.mark=",")
fit <- list(
list("raw" = "nobs", "clean" = "N", "fmt" = fit_format),
list("raw" = "df", "clean" = "DF", "fmt" = fit_format),
list("raw" = "adj.r.squared", "clean" = "R2 Adj.", "fmt" = fit_format),
list("raw" = "F", "clean" = "F-stat.", "fmt" = fit_format),
list("raw" = "p.value", "clean" = "p-value", "fmt" = fit_format)
)
comm_summ <- modelsummary(comm_models,
fmt = function(x) round(x, 2),
stars = TRUE,
coef_omit = 'clean_name',
coef_map = comm_coef_map,
gof_map = fit,
notes = 'All models include municipality-level control variables.'
)
comm_summ
```
```{r ind_data}
df_2022_ind <- df_2022 |>
filter(land_use == "Industrial")
```
#### Dependent Variable: 2011-2022 PIN FMV Growth (Industrial Subset)
```{r tbl-ind_models}
#| tbl-cap: "<b>2011-2022 PIN FMV Growth</b><br><i>2022 Industrial PINs</i>"
ind_models <- list(
"(1)" = lm(fmv_growth_2011 ~ incent_change + clean_name,
data = df_2022_ind),
"(2)" = lm(fmv_growth_2011 ~ incent_change + fmv_2011 + clean_name,
data = df_2022_ind),
"(3)" = lm(fmv_growth_2011 ~ incent_change + fmv_2011 + triad
+ clean_name,
data = df_2022_ind),
"(4)" = lm(fmv_growth_2011 ~ incent_change + fmv_2011 + triad
+ change_prop_use_bin + clean_name,
data = df_2022_ind),
"(5)" = lm(fmv_growth_2011 ~ incent_change + fmv_2011 + triad
+ change_prop_use_bin + in_tif
+ clean_name,
data = df_2022_ind)
)
ind_coef_map <- c(#'(Intercept)' = 'Constant',
#'incent_changeAlways Incentive' = 'Incentive (Always)',
'incent_changeChanges Sometime' = '<b>Changed Incentive</b>',
'change_prop_use_bin1' = 'Changed Prop. Use',
'fmv_2011' = 'Base FMV (2011)',
'in_tif1' = 'TIF',
'triadCity' = 'City Triad',
'triadSouth' = "South Triad",
'triadNorth' = 'North Triad'
)
fit_format <- function(x) format(round(x, 2), big.mark=",")
fit_f <- function(x) format(round(x, 3))
fit <- list(
list("raw" = "nobs", "clean" = "N", "fmt" = fit_format),
list("raw" = "df", "clean" = "DF", "fmt" = fit_format),
list("raw" = "adj.r.squared", "clean" = "R2 Adj.", "fmt" = fit_format),
list("raw" = "F", "clean" = "F-stat.", "fmt" = fit_f),
list("raw" = "p.value", "clean" = "p-value", "fmt" = fit_format)
)
ind_summ <- modelsummary(ind_models,
fmt = function(x) round(x, 2),
stars = TRUE,
coef_omit = 'clean_name',
coef_map = ind_coef_map,
gof_map = fit,
notes = 'All models include municipality-level control variables.'
)
ind_summ
```