InversePropensityWeighting.input_validation#

InversePropensityWeighting.input_validation()[source]#

Validate the input data and model formula for correctness.

Checks that both the treatment variable (left-hand side of the formula) and the outcome_variable exist in self.data, and that the treatment variable has at most two unique values. Note that a constant (single-value) treatment passes this check without error but may cause downstream estimators to fail or produce undefined results.

Raises:

DataException – If the treatment or outcome variable is missing from the data, or if the treatment variable has more than two unique values.

Return type:

None