Skip to contents

Chains demographic-disparity tests over Race, Gender, and AgeCategory against the IndivInjuries_PhysicalInjuries outcome column, plus a data-quality audit against the sidecar.

Usage

morie_arsau_analyze_individual_records(
  year,
  language = "en",
  data_dir = NULL,
  bootstrap_reps = 0L
)

Arguments

year

2023 or 2024.

language

"en" or "fr".

data_dir

Optional explicit ARSAU root.

bootstrap_reps

Integer; forwarded to mrm_uof_demographic_disparity. Set to e.g. 1000 to get percentile-bootstrap CIs on the risk ratios.

Value

A list classed c("morie_arsau_result", "morie_rich_result", "list").

References

Ontario Ministry of the Solicitor General, ARSAU 2023 and 2024 individual_records technical release notes.

Examples

# \donttest{
res <- try(morie_arsau_analyze_individual_records(year = "2024",
                                                  bootstrap_reps = 0L))
if (!inherits(res, "try-error")) print(res)
#> ARSAU individual_records analysis (2024)
#> ========================================
#> Call: morie_arsau_analyze_individual_records(year=‘2024’) 
#> 
#>   Year/range        2024
#>   Kind              individual_records
#>   Rows analysed     5
#>   Columns analysed  112
#>   Valid             yes
#>   Sub-analyses      4
#> 
#> Warning: [disparity_by_race] No non-null rows. 
#> Warning: [disparity_by_gender] No non-null rows. 
#> Warning: [disparity_by_age] No non-null rows. 
#> 
#> Ran 4 sub-analysis(es) over the ARSAU 'individual_records' dataset for '2024': disparity_by_race, disparity_by_gender, disparity_by_age, data_quality. Each sub-result is available as `result$<name>` and the underlying data.frame as `result$data`. Outcome variable is ‘IndivInjuries_PhysicalInjuries’ (coerced from Yes/No strings to 1/0). Disparity tests use the largest-N demographic group as the baseline; pass bootstrap_reps > 0 to attach percentile CIs to the risk ratios. 
# }