| plot.aibias | R Documentation |
Visualizes audit results. Supports five plot types:
- '"trajectory"': Bias trajectory B_{g,r}(t) over time
- '"heatmap"': Group-time disparity surface
- '"transition"': Group-specific transition probabilities
- '"amplification"': Amplification index A_{g,r}(t) over time
- '"decomposition"': Components of the change in the gap at each step
(stacked bars) with the observed change (points), from
[AIBias::aib_decompose()]. Bootstrap intervals for the observed change
are drawn when available and 'show_ci = TRUE'.
## S3 method for class 'aibias'
plot(
x,
type = c("trajectory", "heatmap", "transition", "amplification", "decomposition"),
show_ci = TRUE,
color_palette = NULL,
...
)
x |
An 'aibias' object. |
type |
Character. Plot type. One of '"trajectory"', '"heatmap"', '"transition"', '"amplification"', '"decomposition"'. |
show_ci |
Logical. Show bootstrap CIs if available. Default TRUE. |
color_palette |
Character vector of colors for groups. If NULL, uses a sensible default. |
... |
Ignored. |
A 'ggplot2' object.
data(lending_panel)
obj <- aib_audit(lending_panel,
id = "applicant_id", time = "year",
group = "race", decision = "approved",
ref_group = "White", verbose = FALSE)
plot(obj, type = "trajectory")
plot(obj, type = "heatmap")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.