Skip to content

Commit

Permalink
Merge pull request #33 from john-p-ryan/main
Browse files Browse the repository at this point in the history
Solved discrepancy in JJZ vs LW weights
  • Loading branch information
jdebacker authored Jan 27, 2025
2 parents 634064a + 90e3345 commit 305c52f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iot/inverse_optimal_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(
dist_type="log_normal",
kde_bw=None,
mtr_smoother="kreg",
mtr_smooth_param=3,
mtr_smooth_param=1000,
):
# keep the original data intact
self.data_original = data.copy()
Expand Down Expand Up @@ -130,7 +130,7 @@ def compute_mtr_dist(
"""

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

0 comments on commit 305c52f

Please sign in to comment.