@@ -143,7 +143,14 @@ def __init__(
143
143
144
144
self ._check_effect_sign ()
145
145
146
- # TODO: Add further input checks
146
+ if found_keys := {"h" , "b" } & kwargs .keys ():
147
+ warnings .warn (
148
+ (
149
+ f"Key-worded arguments contain: { found_keys } .\n "
150
+ "Iterative bandwidth selection will be overwritten by provided values."
151
+ )
152
+ )
153
+
147
154
self .kwargs = kwargs
148
155
149
156
self ._smpls = DoubleMLResampling (
@@ -453,10 +460,16 @@ def _update_weights(self):
453
460
def _fit_rdd (self , h = None , b = None ):
454
461
if self .fuzzy :
455
462
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 , ** self .kwargs
463
+ y = self ._M_Y [:, self ._i_rep ],
464
+ x = self ._score ,
465
+ fuzzy = self ._M_D [:, self ._i_rep ],
466
+ c = 0 ,
467
+ ** ({"h" : h , "b" : b } | self .kwargs ),
457
468
)
458
469
else :
459
- rdd_res = rdrobust .rdrobust (y = self ._M_Y [:, self ._i_rep ], x = self ._score , h = h , b = b , ** self .kwargs )
470
+ rdd_res = rdrobust .rdrobust (
471
+ y = self ._M_Y [:, self ._i_rep ], x = self ._score , fuzzy = None , c = 0 , ** ({"h" : h , "b" : b } | self .kwargs )
472
+ )
460
473
return rdd_res
461
474
462
475
def _set_coefs (self , rdd_res , h ):
0 commit comments