Skip to content

Commit b5fe71f

Browse files
committed
fix rdrobust for fuzzy sim
1 parent bd4246f commit b5fe71f

File tree

1 file changed

+5
-1
lines changed
  • monte-cover/src/montecover/rdd

1 file changed

+5
-1
lines changed

monte-cover/src/montecover/rdd/rdd.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ def _rdrobust_benchmark(self, dml_data, dml_params, i_rep):
114114

115115
benchmark_results_list = []
116116
for level in self.confidence_parameters["level"]:
117-
rd_model = rdrobust(y=Y, x=score, covs=Z, c=self.cutoff, level=level * 100)
117+
if self.fuzzy:
118+
D = dml_data.data[dml_data.d_cols]
119+
rd_model = rdrobust(y=Y, x=score, fuzzy=D, covs=Z, c=self.cutoff, level=level * 100)
120+
else:
121+
rd_model = rdrobust(y=Y, x=score, covs=Z, c=self.cutoff, level=level * 100)
118122
coef_rd = rd_model.coef.loc["Robust", "Coeff"]
119123
ci_lower_rd = rd_model.ci.loc["Robust", "CI Lower"]
120124
ci_upper_rd = rd_model.ci.loc["Robust", "CI Upper"]

0 commit comments

Comments
 (0)