causal_testing.estimation.experimental_estimator
This module contains the ExperimentalEstimator class for directly interacting with the system under test.
Module Contents
Classes
A Logistic Regression Estimator is a parametric estimator which restricts the variables in the data to a linear |
- class causal_testing.estimation.experimental_estimator.ExperimentalEstimator(base_test_case: causal_testing.testing.base_test_case.BaseTestCase, treatment_value: float, control_value: float, adjustment_set: dict[str, Any], effect_modifiers: dict[str, Any] = None, alpha: float = 0.05, repeats: int = 200)
Bases:
causal_testing.estimation.abstract_estimator.EstimatorA Logistic Regression Estimator is a parametric estimator which restricts the variables in the data to a linear combination of parameters and functions of the variables (note these functions need not be linear). It is designed for estimating categorical outcomes.
- add_modelling_assumptions()
Add modelling assumptions to the estimator. This is a list of strings which list the modelling assumptions that must hold if the resulting causal inference is to be considered valid.
- abstract run_system(configuration: dict) dict
Runs the system under test with the supplied configuration and supplies the outputs as a dict. :param configuration: The run configuration arguments. :returns: The resulting output as a dict.
- estimate_ate() causal_testing.estimation.effect_estimate.EffectEstimate
Estimate the average treatment effect of the treatment on the outcome. That is, the change in outcome caused by changing the treatment variable from the control value to the treatment value.
- Returns:
The average treatment effect and the bootstrapped confidence intervals.
- estimate_risk_ratio() tuple[pandas.Series, list[pandas.Series, pandas.Series]]
Estimate the risk ratio of the treatment on the outcome. That is, the change in outcome caused by changing the treatment variable from the control value to the treatment value.
- Returns:
The average treatment effect and the bootstrapped confidence intervals.