:py:mod:`causal_testing.estimation.instrumental_variable_estimator` =================================================================== .. py:module:: causal_testing.estimation.instrumental_variable_estimator .. autoapi-nested-parse:: This module contains the InstrumentalVariableEstimator class, for estimating continuous outcomes with unobservable confounding. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: causal_testing.estimation.instrumental_variable_estimator.InstrumentalVariableEstimator Attributes ~~~~~~~~~~ .. autoapisummary:: causal_testing.estimation.instrumental_variable_estimator.logger .. py:data:: logger .. py:class:: 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: :py:obj:`causal_testing.estimation.abstract_estimator.Estimator` Carry 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. .. py:method:: 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. .. py:method:: iv_coefficient(df) -> float Estimate the linear regression coefficient of the treatment on the outcome. .. py:method:: estimate_coefficient(bootstrap_size=100) -> causal_testing.estimation.effect_estimate.EffectEstimate Estimate the unit ate (i.e. coefficient) of the treatment on the outcome.