dowhy.causal_estimators package
Submodules
dowhy.causal_estimators.instrumental_variable_estimator module
- class dowhy.causal_estimators.instrumental_variable_estimator.InstrumentalVariableEstimator(*args, **kwargs)[source]
Bases:
CausalEstimator
Compute effect of treatment using the instrumental variables method.
This is a superclass that is inherited by other specific methods.
Initializes an estimator with data and names of relevant variables.
More description.
- Parameters
data – data frame containing the data
identified_estimand – probability expression representing the target identified estimand to estimate.
treatment – name of the treatment variable
outcome – name of the outcome variable
params – (optional) additional method parameters
- Returns
an instance of the estimator class.
dowhy.causal_estimators.linear_regression_estimator module
- class dowhy.causal_estimators.linear_regression_estimator.LinearRegressionEstimator(*args, **kwargs)[source]
Bases:
CausalEstimator
Compute effect of treatment using linear regression.
The coefficient of the treatment variable in the regression model is computed as the causal effect. Common method but the assumptions required are too strong. Avoid.
Initializes an estimator with data and names of relevant variables.
More description.
- Parameters
data – data frame containing the data
identified_estimand – probability expression representing the target identified estimand to estimate.
treatment – name of the treatment variable
outcome – name of the outcome variable
params – (optional) additional method parameters
- Returns
an instance of the estimator class.
dowhy.causal_estimators.propensity_score_matching_estimator module
- class dowhy.causal_estimators.propensity_score_matching_estimator.PropensityScoreMatchingEstimator(*args, **kwargs)[source]
Bases:
CausalEstimator
Initializes an estimator with data and names of relevant variables.
More description.
- Parameters
data – data frame containing the data
identified_estimand – probability expression representing the target identified estimand to estimate.
treatment – name of the treatment variable
outcome – name of the outcome variable
params – (optional) additional method parameters
- Returns
an instance of the estimator class.
dowhy.causal_estimators.propensity_score_stratification_estimator module
- class dowhy.causal_estimators.propensity_score_stratification_estimator.PropensityScoreStratificationEstimator(*args, num_strata=50, clipping_threshold=10, **kwargs)[source]
Bases:
CausalEstimator
Estimate effect of treatment by stratifying the data into bins with identical common causes.
Straightforward application of the back-door criterion.
Initializes an estimator with data and names of relevant variables.
More description.
- Parameters
data – data frame containing the data
identified_estimand – probability expression representing the target identified estimand to estimate.
treatment – name of the treatment variable
outcome – name of the outcome variable
params – (optional) additional method parameters
- Returns
an instance of the estimator class.
dowhy.causal_estimators.propensity_score_weighting_estimator module
- class dowhy.causal_estimators.propensity_score_weighting_estimator.PropensityScoreWeightingEstimator(*args, min_ps_score=0.05, max_ps_score=0.95, **kwargs)[source]
Bases:
CausalEstimator
Estimate effect of treatment by weighing the data by inverse probability of occurrence.
Straightforward application of the back-door criterion.
Initializes an estimator with data and names of relevant variables.
More description.
- Parameters
data – data frame containing the data
identified_estimand – probability expression representing the target identified estimand to estimate.
treatment – name of the treatment variable
outcome – name of the outcome variable
params – (optional) additional method parameters
- Returns
an instance of the estimator class.
dowhy.causal_estimators.regression_discontinuity_estimator module
- class dowhy.causal_estimators.regression_discontinuity_estimator.RegressionDiscontinuityEstimator(*args, **kwargs)[source]
Bases:
CausalEstimator
Compute effect of treatment using the regression discontinuity method.
Estimates effect by transforming the problem to an instrumental variables problem.
Initializes an estimator with data and names of relevant variables.
More description.
- Parameters
data – data frame containing the data
identified_estimand – probability expression representing the target identified estimand to estimate.
treatment – name of the treatment variable
outcome – name of the outcome variable
params – (optional) additional method parameters
- Returns
an instance of the estimator class.