stacked_regression#

solas_disparity.statistical_significance.stacked_regression(...)#

Create a stacked regression dataset and use it to conduct a two-sample t-test.

Parameters
  • group_data (DataFrame) – Dataframe containing columns for group data.

  • protected_groups (List[str]) – List of protected groups.

  • reference_groups (List[str]) – List of reference groups with the same length as protected_groups.

  • group_categories (List[str]) – List of group categories to which each protected and reference group pair belongs to (e.g. race, gender, age, etc.). Has the same length as protected_groups.

  • outcome (Series) – Outcome series.

  • regression_type (StatSigRegressionType, optional) – Type of regression to be performed. Defaults to StatSigRegressionType.GAUSSIAN.

  • sample_weight (Optional[Series], optional) – Sample weight series. Defaults to None.

Returns

Statistical significance result object.

Return type

StatSig