ananke.estimation package

Submodules

ananke.estimation.automated_if module

Class for automated derivation of influence functions.

class ananke.estimation.automated_if.AutomatedIF(graph, treatment, outcome)[source]

Bases: object

IF for a single treatment and single outcome.

ananke.estimation.counterfactual_mean module

Class that provides an interface to estimation strategies for the counterfactual mean E[Y(t)]

class ananke.estimation.counterfactual_mean.CausalEffect(graph, treatment, outcome)[source]

Bases: object

Provides an interface to various estimation strategies for the ACE: E[Y(1) - Y(0)].

compute_effect(data, estimator, model_binary=None, model_continuous=None, n_bootstraps=0, alpha=0.05)[source]

Bootstrap functionality to compute the Average Causal Effect if the outcome is continuous or the Causal Odds Ratio if the outcome is binary. Returns the point estimate as well as lower and upper quantiles for a user specified confidence level.

Parameters:
  • data – pandas data frame containing the data.
  • estimator – string indicating what estimator to use: e.g. eff-apipw.
  • model_binary – string specifying modeling strategy to use for binary variables: e.g. glm-binary.
  • model_continuous – string specifying modeling strategy to use for continuous variables: e.g. glm-continuous.
  • n_bootstraps – number of bootstraps.
  • alpha – the significance level with the default value of 0.05.
Returns:

one float corresponding to ACE/OR if n_bootstraps=0, else three floats corresponding to ACE/OR, lower quantile, upper quantile.

Module contents