aib_audit: Run the full AIBias audit pipeline

View source: R/aib_audit.R

aib_auditR Documentation

Run the full AIBias audit pipeline

Description

A convenience wrapper that runs the complete audit pipeline: 'aib_describe()', 'aib_transition()', 'aib_amplify()' and 'aib_decompose()'. Optionally runs 'aib_bootstrap()' for uncertainty quantification of every component.

Usage

aib_audit(
  object,
  ref_group = NULL,
  bootstrap = FALSE,
  B = 500,
  seed = NULL,
  verbose = TRUE,
  ...,
  decompose = TRUE,
  lag = c("scheduled", "recorded"),
  min_cell = 10
)

Arguments

object

An 'aibias' object from [AIBias::aib_build()], OR a data frame (in which case '...' arguments are passed to [AIBias::aib_build()]).

ref_group

Character. Reference group.

bootstrap

Logical. Run bootstrap CIs? Default FALSE.

B

Integer. Bootstrap replicates if 'bootstrap = TRUE'.

seed

Integer. Random seed.

verbose

Logical.

...

If 'object' is a data frame, additional arguments passed to [AIBias::aib_build()].

decompose

Logical. Run [AIBias::aib_decompose()]? Default TRUE.

lag

Character. Pairing rule for transitions and the amplification index; see [AIBias::aib_transition()].

min_cell

Integer. Sparse-cell threshold passed to [AIBias::aib_decompose()].

Value

A fully-populated 'aibias' object.

Examples

data(lending_panel)
result <- aib_audit(lending_panel,
                    id        = "applicant_id",
                    time      = "year",
                    group     = "race",
                    decision  = "approved",
                    ref_group = "White")

summary(result)
plot(result, type = "trajectory")



AIBias documentation built on Dec. 1, 2026, 1:06 a.m.