File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments