pub struct FrontdoorCriterion {
pub graph: CausalGraph,
}Expand description
Implements the frontdoor adjustment formula for causal effect identification.
The frontdoor criterion allows identification of causal effects through a
mediator set M when direct adjustment is not possible.
Fields§
§graph: CausalGraphThe causal graph.
Implementations§
Source§impl FrontdoorCriterion
impl FrontdoorCriterion
Sourcepub fn new(graph: CausalGraph) -> Self
pub fn new(graph: CausalGraph) -> Self
Create a new frontdoor criterion object.
Sourcepub fn check(
&self,
treatment: usize,
outcome: usize,
mediator_set: &[usize],
) -> bool
pub fn check( &self, treatment: usize, outcome: usize, mediator_set: &[usize], ) -> bool
Check if mediator_set satisfies the frontdoor criterion for identifying
the effect of treatment on outcome.
Conditions:
- All directed paths from
treatmenttooutcomeare intercepted byM. - No backdoor path from
treatmenttoM(or blocked bytreatment). - All backdoor paths from
Mtooutcomeare blocked bytreatment.
Trait Implementations§
Source§impl Clone for FrontdoorCriterion
impl Clone for FrontdoorCriterion
Source§fn clone(&self) -> FrontdoorCriterion
fn clone(&self) -> FrontdoorCriterion
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 moreAuto Trait Implementations§
impl Freeze for FrontdoorCriterion
impl RefUnwindSafe for FrontdoorCriterion
impl Send for FrontdoorCriterion
impl Sync for FrontdoorCriterion
impl Unpin for FrontdoorCriterion
impl UnsafeUnpin for FrontdoorCriterion
impl UnwindSafe for FrontdoorCriterion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.