Expand description
Causal inference and structural causal models.
Provides:
CausalGraph— directed acyclic graph, topological sort, d-separationStructuralCausalModel— linear SCM with noise terms, do-calculus interventionsBackdoorCriterion— backdoor criterion check and adjustmentFrontdoorCriterion— frontdoor adjustment formulaPropensityScoreMatching— propensity score estimation, ATT/ATEInstrumentalVariables— IV estimation, two-stage least squares (2SLS)CausalDiscovery— PC algorithm skeleton, orientation rulesCounterfactualQuery— E[Y|do(X=x), Z=z] style queries
Structs§
- Backdoor
Criterion - Checks whether a set of variables satisfies the backdoor criterion for
identifying the causal effect of
treatmentonoutcome. - Causal
Discovery - Causal discovery via the PC algorithm.
- Causal
Graph - A directed acyclic graph (DAG) representing causal relationships between variables.
- Counterfactual
Query - Compute counterfactual queries of the form E[Y | do(X=x), Z=z].
- Frontdoor
Criterion - Implements the frontdoor adjustment formula for causal effect identification.
- Instrumental
Variables - Instrumental variables (IV) estimation and Two-Stage Least Squares (2SLS).
- Propensity
Score Matching - Propensity score matching for observational causal inference.
- Structural
Causal Model - A linear structural causal model (SCM).
Functions§
- fisher_
z_ test - Fisher Z-test for conditional independence.
- partial_
correlation - Compute partial correlation of variables
iandjconditioning oncond. - pearson_
correlation - Pearson correlation between variables
iandjin a data matrix. - sample_
covariance - Compute the sample covariance matrix from a data matrix.