causal_testing.estimation.instrumental_variable_estimator
This module contains the InstrumentalVariableEstimator class, for estimating continuous outcomes with unobservable confounding.
Module Contents
Classes
Carry out estimation using instrumental variable adjustment rather than conventional adjustment. This means we do |
Attributes
- causal_testing.estimation.instrumental_variable_estimator.logger
- class causal_testing.estimation.instrumental_variable_estimator.InstrumentalVariableEstimator(base_test_case: causal_testing.testing.base_test_case.BaseTestCase, treatment_value: float, control_value: float, adjustment_set: set, instrument: str, df: pandas.DataFrame = None, alpha: float = 0.05, query: str = '')
Bases:
causal_testing.estimation.abstract_estimator.EstimatorCarry out estimation using instrumental variable adjustment rather than conventional adjustment. This means we do not need to observe all confounders in order to adjust for them. A key assumption here is linearity.
- 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.
- iv_coefficient(df) float
Estimate the linear regression coefficient of the treatment on the outcome.
- estimate_coefficient(bootstrap_size=100) causal_testing.estimation.effect_estimate.EffectEstimate
Estimate the unit ate (i.e. coefficient) of the treatment on the outcome.