Skip to main content

Module causal_inference

Module causal_inference 

Source
Expand description

Causal inference and structural causal models.

Provides:

Structs§

BackdoorCriterion
Checks whether a set of variables satisfies the backdoor criterion for identifying the causal effect of treatment on outcome.
CausalDiscovery
Causal discovery via the PC algorithm.
CausalGraph
A directed acyclic graph (DAG) representing causal relationships between variables.
CounterfactualQuery
Compute counterfactual queries of the form E[Y | do(X=x), Z=z].
FrontdoorCriterion
Implements the frontdoor adjustment formula for causal effect identification.
InstrumentalVariables
Instrumental variables (IV) estimation and Two-Stage Least Squares (2SLS).
PropensityScoreMatching
Propensity score matching for observational causal inference.
StructuralCausalModel
A linear structural causal model (SCM).

Functions§

fisher_z_test
Fisher Z-test for conditional independence.
partial_correlation
Compute partial correlation of variables i and j conditioning on cond.
pearson_correlation
Pearson correlation between variables i and j in a data matrix.
sample_covariance
Compute the sample covariance matrix from a data matrix.