pub struct RdRobustOptions {Show 20 fields
pub c: f64,
pub p: usize,
pub q: usize,
pub deriv: usize,
pub kernel: Kernel,
pub vce: Vce,
pub nnmatch: usize,
pub covs_drop_coll: bool,
pub scaleregul: f64,
pub scalepar: f64,
pub level: f64,
pub bwselect: &'static str,
pub masspoints: &'static str,
pub stdvars: bool,
pub bwrestrict: bool,
pub bwcheck: Option<usize>,
pub rho: Option<f64>,
pub sharpbw: bool,
pub h: Option<(f64, f64)>,
pub b: Option<(f64, f64)>,
}Expand description
Scalar/config options for rdrobust_with, a typed alternative to the raw
rdrobust positional arguments. The data inputs (y, x, fuzzy, covs,
dz, cluster, weights) stay separate; this struct carries everything else.
Default matches the R/Python wrapper defaults, so RdRobustOptions { p: 2, q: 3, ..Default::default() } overrides one knob and leaves the rest at
their R defaults. Each field forwards to the matching positional argument of
rdrobust; see that function for the per-argument semantics.
Fields§
§c: f64RD cutoff on the running variable (R c, default 0).
p: usizePolynomial order for the point estimate (R p, default 1).
q: usizePolynomial order for the bias correction; must exceed p (R q, default 2).
deriv: usizeDerivative order of the estimand: 0 = level, 1 = kink (R deriv, default 0).
kernel: KernelKernel for the local-polynomial weights (R kernel, default triangular).
vce: VceVariance estimator before any cluster remap (R vce, default nn).
nnmatch: usizeMinimum neighbors for vce = nn (R nnmatch, default 3).
covs_drop_coll: boolDrop collinear covariates in the FWL partialling (R covs_drop, default false here).
scaleregul: f64Regularization scale in bandwidth selection; 0 removes it (R scaleregul, default 1).
scalepar: f64Scaling applied to the RD parameter (R scalepar, default 1).
level: f64Confidence-interval level in percent, e.g. 95 (R level, default 95).
bwselect: &'static strBandwidth-selection method when h is None, e.g. "mserd" (R bwselect, default “mserd”).
masspoints: &'static strMass-point handling: "off", "check", or "adjust" (R masspoints, default “adjust”).
stdvars: boolStandardize x and y before bandwidth selection (R stdvars, default true).
bwrestrict: boolClamp selected bandwidths to the range of x (R bwrestrict, default true).
bwcheck: Option<usize>Minimum unique observations in the pilot bandwidth; None skips the check (R bwcheck, default NULL).
rho: Option<f64>Sets b = h / rho; None leaves b from b/selection (R rho, default NULL).
sharpbw: boolForce sharp-RD bandwidth selection in a fuzzy design (R sharpbw, default false).
h: Option<(f64, f64)>Main bandwidths (left, right); None triggers selection (R h, default NULL).
b: Option<(f64, f64)>Bias bandwidths (left, right); None defaults to h (or h / rho) (R b, default NULL).
Trait Implementations§
Source§impl Clone for RdRobustOptions
impl Clone for RdRobustOptions
impl Copy for RdRobustOptions
Source§impl Debug for RdRobustOptions
impl Debug for RdRobustOptions
Auto Trait Implementations§
impl Freeze for RdRobustOptions
impl RefUnwindSafe for RdRobustOptions
impl Send for RdRobustOptions
impl Sync for RdRobustOptions
impl Unpin for RdRobustOptions
impl UnsafeUnpin for RdRobustOptions
impl UnwindSafe for RdRobustOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.