Skip to contents

Examine balance for positive class of a model

Usage

eval_pos_class_bal(
  data,
  outcome,
  group,
  probs,
  alpha = 0.05,
  bootstraps = 2500,
  digits = 2,
  message = TRUE
)

Arguments

data

Data frame containing the outcome, predicted outcome, and sensitive attribute

outcome

Name of the outcome variable

group

Name of the sensitive attribute

probs

Predicted probabilities

alpha

The 1 - significance level for the confidence interval, default is 0.05

bootstraps

Number of bootstraps to use for confidence intervals

digits

Number of digits to round the results to, default is 2

message

Whether to print the results, default is TRUE

confint

Logical indicating whether to calculate confidence intervals

Value

A list containing the following elements:

  • Average predicted probability for Group 1

  • Average predicted probability for Group 2

  • Difference in average predicted probability If confidence intervals are computed (confint = TRUE):

  • A vector of length 2 containing the lower and upper bounds of the 95% confidence interval for the difference in average predicted probability