Skip to contents

Builds a weapon x force contingency table, runs a chi-square test of independence, computes Cramer's V, and reports the top-3 (weapon, force) cells by standardised Pearson residual.

Usage

mrm_uof_weapon_diversity(df, weapon_col, force_col)

Arguments

df

A data.frame.

weapon_col

Categorical weapon column.

force_col

Categorical force / service column.

Value

A named list with chi2, pvalue, df, cramers_v, top_residuals (list-of-lists), and an interpretation paragraph.