Skip to contents

Pearson chi-square + Cramer's V on every meaningful 2-way slice of the c-series datasets. Honour to Prof. Doob's chi-square tradition in Canadian corrections research.

Usage

morie_otis_analyze_c_chi2(
  datasets,
  contingency_value = "NumberIndividuals_RestrictiveConfinement",
  out_dir = NULL
)

Arguments

datasets

Named list of c-series data.frames (e.g. list(c03 = otis_c03, c04 = otis_c04, ...)).

contingency_value

Count column to pivot on (default "NumberIndividuals_RestrictiveConfinement").

out_dir

Optional output directory.

Value

morie_otis_analysis_result.

Examples

# \donttest{
otis_c03 <- morie_synth_otis("c03", n = 120L, seed = 1L)
otis_c04 <- morie_synth_otis("c04", n = 120L, seed = 1L)
morie_otis_analyze_c_chi2(list(c03 = otis_c03, c04 = otis_c04))
#> OTIS c-series -- chi^2 + Cramer's V family on demographic contingency tables
#> ============================================================================
#>   Contingency value column  NumberIndividuals_RestrictiveConfinement
#>   Slices tested             7
#> 
#> Cramer's V is the canonical effect-size measure for chi^2 independence on 2-way contingency tables: V~0 -> independence, V->1 -> strong association. p<.05 with V<0.1 ==> statistically detectable but practically tiny. 
# }