pub struct LinearSensitivity {
pub partial_r2_grid: Vec<f64>,
pub pass_threshold: f64,
pub estimator: LinearAdjustmentAte,
}Expand description
Linear confounding sensitivity: simulated Gaussian confounder with configurable partial R².
Fields§
§partial_r2_grid: Vec<f64>Ascending grid of partial-R² values to test (shared for treatment and outcome).
pass_threshold: f64Pass if the robustness value exceeds this threshold (harder to explain away).
estimator: LinearAdjustmentAteEstimator used for refits (bootstrap disabled).
Implementations§
Source§impl LinearSensitivity
impl LinearSensitivity
Sourcepub fn new() -> Self
pub fn new() -> Self
Defaults: grid [0.01, 0.02, 0.05, 0.1, 0.2, 0.3, 0.5], pass threshold 0.1.
Sourcepub fn refute(
&self,
problem: &RefutationProblem<'_>,
workspace: &mut EstimationWorkspace,
ctx: &ExecutionContext,
) -> Result<RefutationReport, ValidationError>
pub fn refute( &self, problem: &RefutationProblem<'_>, workspace: &mut EstimationWorkspace, ctx: &ExecutionContext, ) -> Result<RefutationReport, ValidationError>
Run the linear sensitivity refuter.
§Errors
Data or estimation failures, or an empty partial_r2_grid.
Trait Implementations§
Source§impl Clone for LinearSensitivity
impl Clone for LinearSensitivity
Source§fn clone(&self) -> LinearSensitivity
fn clone(&self) -> LinearSensitivity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LinearSensitivity
impl Debug for LinearSensitivity
Source§impl Default for LinearSensitivity
impl Default for LinearSensitivity
Source§impl<'a> Validator<RefutationProblem<'a>> for LinearSensitivity
impl<'a> Validator<RefutationProblem<'a>> for LinearSensitivity
Source§type Prepared = PreparedRefutation<'a>
type Prepared = PreparedRefutation<'a>
Prepared artifact produced by
Self::prepare.Source§type Report = RefutationReport
type Report = RefutationReport
Report produced by
Self::validate.Source§fn prepare(
&self,
artifact: &RefutationProblem<'a>,
_ctx: &ExecutionContext,
) -> Result<Self::Prepared, ValidationError>
fn prepare( &self, artifact: &RefutationProblem<'a>, _ctx: &ExecutionContext, ) -> Result<Self::Prepared, ValidationError>
Compile
artifact into a reusable prepared form. Read moreSource§fn validate(
&self,
prepared: &mut Self::Prepared,
workspace: &mut EstimationWorkspace,
ctx: &ExecutionContext,
) -> Result<Self::Report, ValidationError>
fn validate( &self, prepared: &mut Self::Prepared, workspace: &mut EstimationWorkspace, ctx: &ExecutionContext, ) -> Result<Self::Report, ValidationError>
Run the check on a prepared artifact. Read more
Auto Trait Implementations§
impl Freeze for LinearSensitivity
impl RefUnwindSafe for LinearSensitivity
impl Send for LinearSensitivity
impl Sync for LinearSensitivity
impl Unpin for LinearSensitivity
impl UnsafeUnpin for LinearSensitivity
impl UnwindSafe for LinearSensitivity
Blanket Implementations§
impl<T> Allocation for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> ForeignBufferOwner for T
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