pub struct PathSpecificEffectQuery {
pub treatment: VariableId,
pub outcome: VariableId,
pub path_nodes: Arc<[VariableId]>,
pub control: Intervention,
pub active: Intervention,
pub target_population: TargetPopulation,
pub max_paths: usize,
pub max_len: usize,
}Expand description
Path-specific effect / contribution query.
Prefer this over overloading MediationQuery. Path contribution
attribution is available via GCM path_decompose; path-restricted natural
effects identify/estimate via the ID family (path_specific.natural) and
functional.effect plug-in estimation.
Fields§
§treatment: VariableIdTreatment / source variable.
outcome: VariableIdOutcome variable.
path_nodes: Arc<[VariableId]>Intermediate nodes constraining the path set (empty = all directed paths).
control: InterventionControl intervention level.
active: InterventionActive intervention level.
target_population: TargetPopulationTarget population.
max_paths: usizeMaximum number of paths to enumerate.
max_len: usizeMaximum path length (edges).
Implementations§
Source§impl PathSpecificEffectQuery
impl PathSpecificEffectQuery
Sourcepub fn binary(treatment: VariableId, outcome: VariableId) -> Self
pub fn binary(treatment: VariableId, outcome: VariableId) -> Self
Binary 0/1 treatment contrast with all directed paths and default limits.
Sourcepub fn with_path_nodes(self, nodes: impl Into<Arc<[VariableId]>>) -> Self
pub fn with_path_nodes(self, nodes: impl Into<Arc<[VariableId]>>) -> Self
Restrict to paths that visit these intermediate nodes (in any order).
Sourcepub const fn with_max_paths(self, max_paths: usize) -> Self
pub const fn with_max_paths(self, max_paths: usize) -> Self
Cap path enumeration.
Sourcepub const fn with_max_len(self, max_len: usize) -> Self
pub const fn with_max_len(self, max_len: usize) -> Self
Cap path length.
Sourcepub fn with_target_population(self, population: TargetPopulation) -> Self
pub fn with_target_population(self, population: TargetPopulation) -> Self
Set target population.
Trait Implementations§
Source§impl Clone for PathSpecificEffectQuery
impl Clone for PathSpecificEffectQuery
Source§fn clone(&self) -> PathSpecificEffectQuery
fn clone(&self) -> PathSpecificEffectQuery
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 PathSpecificEffectQuery
impl Debug for PathSpecificEffectQuery
Source§impl From<PathSpecificEffectQuery> for CausalQuery
impl From<PathSpecificEffectQuery> for CausalQuery
Source§fn from(query: PathSpecificEffectQuery) -> Self
fn from(query: PathSpecificEffectQuery) -> Self
Converts to this type from the input type.
Source§impl PartialEq for PathSpecificEffectQuery
impl PartialEq for PathSpecificEffectQuery
impl StructuralPartialEq for PathSpecificEffectQuery
Auto Trait Implementations§
impl Freeze for PathSpecificEffectQuery
impl RefUnwindSafe for PathSpecificEffectQuery
impl Send for PathSpecificEffectQuery
impl Sync for PathSpecificEffectQuery
impl Unpin for PathSpecificEffectQuery
impl UnsafeUnpin for PathSpecificEffectQuery
impl UnwindSafe for PathSpecificEffectQuery
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