Skip to content

Commit 305c52f

Browse files
authored
Merge pull request #33 from john-p-ryan/main
Solved discrepancy in JJZ vs LW weights
2 parents 634064a + 90e3345 commit 305c52f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

iot/inverse_optimal_tax.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(
4444
dist_type="log_normal",
4545
kde_bw=None,
4646
mtr_smoother="kreg",
47-
mtr_smooth_param=3,
47+
mtr_smooth_param=1000,
4848
):
4949
# keep the original data intact
5050
self.data_original = data.copy()
@@ -130,7 +130,7 @@ def compute_mtr_dist(
130130
"""
131131

132132
if mtr_smoother == "kreg":
133-
bins = 1000 # number of equal-width bins
133+
bins = mtr_smooth_param # number of equal-width bins
134134
data.loc[:, ["z_bin"]] = pd.cut(
135135
data[income_measure], bins, include_lowest=True
136136
)
@@ -153,7 +153,7 @@ def compute_mtr_dist(
153153
bw=[mtr_smooth_param * 40_000],
154154
)
155155
mtr, _ = mtr_function.fit(self.z)
156-
mtr_prime = np.gradient(mtr, edge_order=2)
156+
mtr_prime = np.gradient(mtr, self.z, edge_order=2)
157157
elif mtr_smoother == "HSV":
158158
# estimate the HSV function on mtrs via weighted least squares
159159
# DATA CLEANING

0 commit comments

Comments
 (0)