causal_testing.testing.causal_test_result
This module contains the CausalTestResult class, which is a container for the results of a causal test.
Module Contents
Classes
A container to hold the results of a causal test case. Every causal test case provides a point estimate of |
Attributes
- causal_testing.testing.causal_test_result.TestOutcome
- class causal_testing.testing.causal_test_result.CausalTestResult(effect_estimate: causal_testing.estimation.effect_estimate.EffectEstimate, outcome: TestOutcome, adequacy=None, error_message: str = None)
A container to hold the results of a causal test case. Every causal test case provides a point estimate of the ATE, given a particular treatment, outcome, and adjustment set. Some but not all estimators can provide confidence intervals.
- property passed: bool
Check whether the test has passed. :returns: True if the test outcome is PASS.
- to_dict(include_adequacy_results: bool = False)
Convert the result to a python dictionary for easy serialisation as JSON.
- Parameters:
include_adequacy_results – Whether to include the effect estimate and test outcome for adequacy bootstraps.
- Returns:
A JSON serialisable dict representing the test result.
- effect_direction() str
Check whether the estimated causal effect is negative or positive.
- Returns:
Whether the estimated causal effect is positive or negative (or no effect).