-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathincentives_all_models.qmd
116 lines (88 loc) · 3.33 KB
/
incentives_all_models.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
---
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)
```
# Load and Review Data
```{r data_read}
#| output: false
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
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),
incent_prop = as.factor(incent_prop),
fmv_growth_2011 = as.numeric(as.character(fmv_growth_2011)),
clean_name = as.factor(clean_name),
fmv = as.numeric(as.character(fmv))) |>
# Set reference levels
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(incent_change_bin = as.factor(ifelse(incent_change ==
"Changes Sometime", 1, 0)),
prop_use_change_bin = as.factor(ifelse(landuse_change ==
"Changes Land Use", 1, 0)),
is_chicago = as.factor(ifelse(clean_name == "Chicago", 1, 0))
) |>
rename(fmv_2011 = base_year_fmv_2011) |>
mutate(fmv_2011 = as.numeric(as.character(fmv_2011)))
```
# OLS
## All Income Producing Properties
## Just Commercial
## Just Industrial
# Fixed Effect Models
# Pooled OLS Models