pub enum RdError {
TooFewObs,
LengthMismatch {
name: &'static str,
len: usize,
expected: usize,
},
NonFinite {
name: &'static str,
},
OneSidedCutoff,
InvalidOrder,
InvalidNnmatch,
InvalidLevel,
NonPositiveBandwidth {
name: &'static str,
},
NonNegativeWeightRequired,
EmptyCovariates,
DegenerateFuzzy,
}Expand description
Validation failure for try_rdrobust_with: a degenerate input or option that
the raw rdrobust/rdrobust_with path would otherwise carry into NaN
results. Each variant mirrors a check the Python binding already performs, with
the same message text, so the two channels agree on what they reject.
Variants§
TooFewObs
Fewer than two observations in y/x.
LengthMismatch
A length-n input has a length other than expected (the length of y).
Fields
NonFinite
An input contains a non-finite value (NaN or infinity).
Fields
OneSidedCutoff
The cutoff c is not strictly inside the support of x (min(x) < c < max(x)).
InvalidOrder
Invalid polynomial/derivative orders: q <= p or deriv > p.
InvalidNnmatch
nnmatch is less than 1.
InvalidLevel
level is outside the open interval (0, 100).
NonPositiveBandwidth
A bandwidth-like scalar (h, b, or rho) is not strictly positive.
NonNegativeWeightRequired
A weight is negative.
EmptyCovariates
Covariates were supplied (covs is Some) but with zero columns (dz == 0).
DegenerateFuzzy
The fuzzy first stage is constant on both sides of the cutoff with no jump, so the treatment effect is not identified (R stops with the same diagnosis).
Trait Implementations§
impl Copy for RdError
impl Eq for RdError
Source§impl Error for RdError
impl Error for RdError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl StructuralPartialEq for RdError
Auto Trait Implementations§
impl Freeze for RdError
impl RefUnwindSafe for RdError
impl Send for RdError
impl Sync for RdError
impl Unpin for RdError
impl UnsafeUnpin for RdError
impl UnwindSafe for RdError
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
impl<T> Scalar 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.