Skip to content

Commit 1566af4

Browse files
committed
allow custom bandwidth for rdd
1 parent eefbed1 commit 1566af4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doubleml/rdd/rdd.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,12 @@ def _update_weights(self):
453453
def _fit_rdd(self, h=None, b=None):
454454
if self.fuzzy:
455455
rdd_res = rdrobust.rdrobust(
456-
y=self._M_Y[:, self._i_rep], x=self._score, fuzzy=self._M_D[:, self._i_rep], h=h, b=b, c=0, **self.kwargs
456+
y=self._M_Y[:, self._i_rep], x=self._score, fuzzy=self._M_D[:, self._i_rep],
457+
c=0, **{{"h": h, "b": b} | self.kwargs}
457458
)
458459
else:
459-
rdd_res = rdrobust.rdrobust(y=self._M_Y[:, self._i_rep], x=self._score, fuzzy=None, h=h, b=b, **self.kwargs)
460+
rdd_res = rdrobust.rdrobust(y=self._M_Y[:, self._i_rep], x=self._score, fuzzy=None,
461+
c=0, **{{"h": h, "b": b} | self.kwargs})
460462
return rdd_res
461463

462464
def _set_coefs(self, rdd_res, h):

0 commit comments

Comments
 (0)