Skip to contents

Cross-tabulates charges_recommended against incident-year and tests independence with a Pearson chi-square ( stats::chisq.test; p-value via stats::pchisq). Years with zero charge-decided cases are dropped. Complements morie_siu_verify_chi2 in sprott_doob.R, which tests specific published 2x2 tables; this is a generic "did the charge rate move?" probe over the harvested SIU corpus.

Usage

morie_siu_charges_by_year_chi2(data = NULL)

Arguments

data

Either a data frame (e.g. the output of morie_fetch_siu() read in) or a path to SIU_by_case.csv. NULL (the default) looks in file.path(tempdir(), "morie", "siu", "SIU_by_case.csv").

Value

A morie_rich_result list including the contingency table, statistic, df, and p-value.