| Type: | Package |
| Title: | Statistical Auditing and Governance Reporting for Employment AI Systems |
| Version: | 0.1.0 |
| Description: | Provides statistical auditing, risk documentation, and reporting tools to support AI governance workflows for employment and hiring decision systems. Implements the EEOC four-fifths adverse impact rule (Equal Employment Opportunity Commission, 1978, https://www.ecfr.gov/current/title-29/subtitle-B/chapter-XIV/part-1607), NYC Local Law 144 bias audit requirements (New York City, 2023, https://www.nyc.gov/site/dca/about/automated-employment-decision-tools.page), and the AI Risk Management Framework checklist items from the National Institute of Standards and Technology (2023, <doi:10.6028/NIST.AI.100-1>). Optionally supports EU AI Act high-risk classification (European Parliament and Council, 2024, https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32024R1689). The package does not provide legal advice or certify legal compliance; it is a statistical and documentation support tool. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| LazyData: | true |
| RoxygenNote: | 7.3.3 |
| Depends: | R (≥ 4.1.0) |
| Imports: | cli, rlang, stats, tibble, dplyr |
| Suggests: | ggplot2, knitr, rmarkdown, testthat (≥ 3.0.0) |
| VignetteBuilder: | knitr |
| Language: | en-US |
| URL: | https://github.com/causalfragility-lab/AIGovernance |
| BugReports: | https://github.com/causalfragility-lab/AIGovernance/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-05-19 14:37:57 UTC; Subir |
| Author: | Subir Hait |
| Maintainer: | Subir Hait <haitsubi@msu.edu> |
| Repository: | CRAN |
| Date/Publication: | 2026-05-27 09:50:07 UTC |
EEOC Adverse Impact Analysis (4/5ths Rule)
Description
Computes selection rates by group and applies the EEOC Uniform Guidelines 4/5ths (80%) rule to assess adverse impact in employment selection procedures (EEOC, 1978).
The Adverse Impact Ratio (AIR) for each group is:
AIR_g = \frac{\text{selection rate}_g}{\text{selection rate}_{\text{ref}}}
A group is flagged for adverse impact when AIR < 0.80.
The function also reports the two-proportion Z-test and Fisher's exact
test p-values as supplementary statistics.
Note: The 4/5ths rule is a rule of thumb, not a bright-line legal standard. Small sample sizes reduce reliability. This function does not provide legal advice.
Usage
aigov_adverse_impact(gov, min_n = 30L)
Arguments
gov |
An |
min_n |
Integer. Minimum group sample size for a reliable AIR estimate.
Groups below this threshold are flagged with a warning. Default |
Value
The input gov object with gov$results$adverse_impact
appended, a tibble containing:
groupGroup label.
nTotal applicants in group.
n_selectedNumber selected.
selection_rateProportion selected.
AIRAdverse Impact Ratio vs reference group.
fourfifths_flagLogical:
TRUEif AIR < 0.80.z_statTwo-proportion Z statistic.
p_valueTwo-sided p-value from Z test.
fisher_pFisher's exact test p-value.
small_n_flagLogical:
TRUEif n <min_n.
References
Equal Employment Opportunity Commission (1978). Uniform guidelines on employee selection procedures. Federal Register, 43(166), 38295–38309.
Examples
data(hiring_sim)
gov <- aigov_build(hiring_sim, selected, race_ethnicity, ref_group = "White")
gov <- aigov_adverse_impact(gov)
gov$results$adverse_impact
NIST AI Risk Management Framework (AI RMF 1.0) Audit
Description
Implements a structured checklist audit aligned with the NIST AI Risk Management Framework (AI RMF 1.0, NIST, 2023). The RMF organises AI risk management into four core functions: GOVERN, MAP, MEASURE, and MANAGE.
This function presents the checklist items most relevant to employment AI
systems and records user-supplied responses (or defaults to NA
for items that cannot be verified from data alone).
Usage
aigov_audit_nist(gov, responses = list())
Arguments
gov |
An |
responses |
An optional named list of logical values ( |
Value
The input gov object with gov$results$nist_rmf
appended, containing:
checklistNamed list with
TRUE/FALSE/NAper item.scoresPer-function completion scores (proportion of confirmed items).
overall_scoreOverall confirmed proportion.
verdictOne of
"GREEN"(>= 0.75),"AMBER"(0.50–0.74), or"RED"(< 0.50).
References
National Institute of Standards and Technology (2023). Artificial Intelligence Risk Management Framework (AI RMF 1.0). NIST AI 100-1. doi:10.6028/NIST.AI.100-1
Examples
data(hiring_sim)
gov <- aigov_build(hiring_sim, selected, race_ethnicity, ref_group = "White")
gov <- aigov_audit_nist(gov, responses = list(
GOVERN_1_1 = TRUE,
GOVERN_1_2 = TRUE,
MAP_1_1 = TRUE
))
NYC Local Law 144 Bias Audit Module
Description
Implements the statistical components of a NYC Local Law 144 (2023) bias audit for Automated Employment Decision Tools (AEDTs). The law requires employers using AEDTs to:
Conduct an annual independent bias audit.
Publish a summary of audit results on their website.
Provide advance notice to candidates/employees.
This function computes the required impact ratio statistics for each race/ethnicity and sex category and generates a publication-ready summary table matching the format expected in public disclosures.
The NYC LL144 impact ratio is:
IR_g = \frac{\text{selection rate}_g}{\text{selection rate of most-selected category}}
Note: LL144 uses the most-selected category (not a user-specified reference group) as the denominator – this differs from the EEOC approach. This function implements both.
Usage
aigov_audit_nyc(gov, use_most_selected = TRUE)
Arguments
gov |
An |
use_most_selected |
Logical. If |
Value
The input gov object with gov$results$nyc_ll144
appended, containing:
impact_tableTibble with selection rates and impact ratios.
most_selected_groupThe reference category used.
disclosure_tableFormatted table for public disclosure.
checklistLL144 procedural checklist (named logical vector).
verdictStatistical verdict:
"PASS"or"REVIEW".
References
New York City Local Law 144 of 2021 (effective January 1, 2023). NYC Department of Consumer and Worker Protection (DCWP). https://www.nyc.gov/site/dca/about/automated-employment-decision-tools.page
Examples
data(hiring_sim)
gov <- aigov_build(hiring_sim, selected, race_ethnicity, ref_group = "White",
frameworks = c("NYC_LL144"))
gov <- aigov_audit_nyc(gov)
Build an AIGovernance audit object
Description
Constructs an aigov object from employment decision data. This is the
entry point for all auditing, classification, and reporting functions in the
AIGovernance package.
Disclaimer: AIGovernance provides statistical and documentation support tools only. It does not provide legal advice and does not certify compliance with any law or regulation.
Usage
aigov_build(
data,
outcome,
group,
ref_group,
frameworks = c("EEOC", "NYC_LL144", "NIST_RMF"),
org_name = NULL,
system_name = NULL,
audit_date = NULL
)
Arguments
data |
A data frame containing the employment decision records. |
outcome |
Unquoted column name of the binary decision variable (1 = selected / hired / advanced; 0 = not selected). |
group |
Unquoted column name of the protected-class variable (e.g., race/ethnicity, gender). |
ref_group |
Character string identifying the reference group (typically
the highest-selection-rate group, e.g. |
frameworks |
Character vector of governance frameworks to activate.
One or more of |
org_name |
Optional character string — organisation name for reports. |
system_name |
Optional character string — name of the AI system being
audited (e.g., |
audit_date |
Optional |
Value
An object of class "aigov" containing:
dataThe input data frame.
outcomeName of the outcome column (character).
groupName of the group column (character).
ref_groupReference group label.
frameworksActive frameworks.
org_nameOrganisation name.
system_nameAI system name.
audit_dateAudit date.
group_levelsAll observed group labels.
n_totalTotal number of records.
Examples
data(hiring_sim)
gov <- aigov_build(
data = hiring_sim,
outcome = selected,
group = race_ethnicity,
ref_group = "White",
frameworks = c("EEOC", "NYC_LL144", "NIST_RMF"),
org_name = "Acme Corp",
system_name = "Resume Screening Tool v1.0"
)
print(gov)
Display Governance Checklist for a Framework
Description
Returns all checklist item names and descriptions for a given framework.
Use the returned item names as keys in the responses argument of
aigov_audit_nist.
Usage
aigov_checklist(gov, framework)
Arguments
gov |
An |
framework |
Character. One of |
Value
A tibble with columns item_id, function_area,
and description.
Examples
data(hiring_sim)
gov <- aigov_build(hiring_sim, selected, race_ethnicity, ref_group = "White")
aigov_checklist(gov, "NYC_LL144")
aigov_checklist(gov, "NIST_RMF")
Classify AI System Risk Level
Description
Classifies the AI system under two frameworks:
-
EU AI Act (2024) – Assigns one of four risk tiers: Unacceptable, High, Limited, or Minimal risk. Employment/worker-management AI is listed in Annex III as High Risk.
-
NIST AI RMF – Assigns a risk tier (1–4) based on impact on individuals' rights and opportunities.
Usage
aigov_classify(
gov,
domain = "employment",
makes_final_decision = TRUE,
human_oversight = NA
)
Arguments
gov |
An |
domain |
Character. Application domain. One of |
makes_final_decision |
Logical. Does the AI system make or
substantially influence a final employment decision? Default |
human_oversight |
Logical. Is meaningful human review in place before
the AI decision takes effect? Default |
Value
The input gov object with gov$results$risk_class
appended, containing EU AI Act and NIST risk classifications with
explanatory text.
References
European Parliament and Council (2024). Regulation (EU) 2024/1689 (EU AI Act). https://digital-strategy.ec.europa.eu/en/policies/regulatory-framework-ai
NIST (2023). AI RMF 1.0. doi:10.6028/NIST.AI.100-1
Examples
data(hiring_sim)
gov <- aigov_build(hiring_sim, selected, race_ethnicity, ref_group = "White")
gov <- aigov_classify(gov, domain = "employment",
makes_final_decision = TRUE,
human_oversight = FALSE)
Generate an AI Governance Audit Report
Description
Produces a self-contained HTML (or plain-text) governance audit report
from a completed aigov object. The report is suitable for internal
documentation, legal review, or public disclosure (e.g., NYC LL144 website
posting requirement).
Usage
aigov_report(gov, format = "html", output_file = NULL, open = TRUE)
Arguments
gov |
A completed |
format |
Character. Output format: |
output_file |
Optional character. File path for the output. If
|
open |
Logical. If |
Value
Invisibly returns the path to the generated file.
Examples
data(hiring_sim)
gov <- aigov_build(hiring_sim, selected, race_ethnicity, ref_group = "White")
gov <- aigov_adverse_impact(gov)
gov <- aigov_audit_nyc(gov)
gov <- aigov_audit_nist(gov)
aigov_report(gov, format = "html")
Determine Applicable Governance Frameworks
Description
Returns a summary of which governance frameworks apply to the AI system
described in the aigov object, based on domain and jurisdiction.
Usage
aigov_scope(gov, domain = "employment", us_state = NULL)
Arguments
gov |
An |
domain |
Character. Application domain (default |
us_state |
Optional character. US state, e.g. |
Value
A tibble with columns framework, applies,
jurisdiction, and note.
Examples
data(hiring_sim)
gov <- aigov_build(hiring_sim, selected, race_ethnicity, ref_group = "White")
aigov_scope(gov, domain = "employment", us_state = "NY")
Simulated Employment Screening Dataset
Description
A synthetic dataset of 500 job applicants processed by a hypothetical automated resume-screening tool. Generated for illustrative and testing purposes only. All individuals are fictional.
Usage
hiring_sim
Format
A data frame with 500 rows and 6 variables:
applicant_idInteger applicant identifier.
race_ethnicityCharacter. One of
"White","Black","Hispanic","Asian","Other".genderCharacter.
"Male"or"Female".years_experienceNumeric. Years of relevant experience.
scoreNumeric. AI screening score (0–100).
selectedInteger (0/1). Whether the applicant was advanced to the next stage (1 = selected, 0 = not selected).
Details
Selection probabilities were set to produce a realistic adverse impact pattern across race/ethnicity groups, consistent with published empirical ranges. The data are purely synthetic and do not represent any real organisation or hiring process.
Source
Simulated by the package authors for illustration purposes.
Examples
data(hiring_sim)
head(hiring_sim)
table(hiring_sim$race_ethnicity, hiring_sim$selected)