@@ -45,6 +45,7 @@ def __init__(
4545 kde_bw = None ,
4646 mtr_smoother = "kreg" ,
4747 mtr_smooth_param = 1000 ,
48+ kreg_bw = [120_000 ],
4849 ):
4950 # keep the original data intact
5051 self .data_original = data .copy ()
@@ -75,7 +76,7 @@ def __init__(
7576 self .eti = eti_spl (self .z )
7677 # compute marginal tax rate schedule
7778 self .mtr , self .mtr_prime = self .compute_mtr_dist (
78- data , weight_var , income_measure , mtr_smoother , mtr_smooth_param
79+ data , weight_var , income_measure , mtr_smoother , mtr_smooth_param , kreg_bw
7980 )
8081 # compute theta_z, the elasticity of the tax base
8182 self .theta_z = 1 + ((self .z * self .f_prime ) / self .f )
@@ -108,7 +109,7 @@ def df(self):
108109 return df
109110
110111 def compute_mtr_dist (
111- self , data , weight_var , income_measure , mtr_smoother , mtr_smooth_param
112+ self , data , weight_var , income_measure , mtr_smoother , mtr_smooth_param , kreg_bw
112113 ):
113114 """
114115 Compute marginal tax rates over the income distribution and
@@ -150,7 +151,7 @@ def compute_mtr_dist(
150151 binned_data [income_measure ].dropna (),
151152 var_type = "c" ,
152153 reg_type = "ll" ,
153- bw = [ mtr_smooth_param * 40_000 ] ,
154+ bw = kreg_bw ,
154155 )
155156 mtr , _ = mtr_function .fit (self .z )
156157 mtr_prime = np .gradient (mtr , self .z , edge_order = 2 )
0 commit comments