pub struct Lpq { /* private fields */ }Expand description
Local potential quantile of compliers, with a binary instrument, as
DoubleML’s DoubleMLLPQ. ml_g is a classifier for
P(1{D = d}·1{Y ≤ θ̃} = 1 | Z = z, X), ml_m a classifier used for the
instrument propensity P(Z = 1 | X) and for P(D = 1 | Z = z, X).
Default sample splits are stratified by treatment and instrument.
Implementations§
Source§impl Lpq
impl Lpq
pub fn new( ml_g: impl Classifier + 'static, ml_m: impl Classifier + 'static, ) -> Self
pub fn from_boxed(ml_g: Box<dyn Classifier>, ml_m: Box<dyn Classifier>) -> Self
Sourcepub fn treatment(self, treatment: u8) -> Self
pub fn treatment(self, treatment: u8) -> Self
Treatment level d of the potential outcome (0 or 1, default 1).
Sourcepub fn clipping_threshold(self, t: f64) -> Self
pub fn clipping_threshold(self, t: f64) -> Self
Propensity scores are clipped to [t, 1 − t] (default t = 0.01).
Sourcepub fn normalize_ipw(self, normalize: bool) -> Self
pub fn normalize_ipw(self, normalize: bool) -> Self
Normalise the inverse-probability weights (default true, as DoubleML).
Sourcepub fn calibration(self, calibration: Calibration) -> Self
pub fn calibration(self, calibration: Calibration) -> Self
Calibrate the propensity scores before clipping (default: none), as
DoubleML’s ps_processor_config.
pub fn fit(&self, data: &DmlData) -> Result<DmlFit>
pub fn fit_with_folds( &self, data: &DmlData, splits: &[Vec<Fold>], ) -> Result<DmlFit>
Auto Trait Implementations§
impl !RefUnwindSafe for Lpq
impl !UnwindSafe for Lpq
impl Freeze for Lpq
impl Send for Lpq
impl Sync for Lpq
impl Unpin for Lpq
impl UnsafeUnpin for Lpq
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more