Skip to contents

Cross-tabulates a categorical outcome column (default director_decision_category) by service and year, reporting both raw counts and within-service shares. If the supplied outcome_col is not present, looks for a few common alternatives (director_decision, outcome).

Usage

mrm_siu_outcome_classifier(
  data,
  outcome_col = "director_decision_category",
  service_col = "police_service"
)

Arguments

data

A data.frame in the SIU case schema.

outcome_col

Outcome category column (default "director_decision_category").

service_col

Police-service column (default "police_service").

Value

A data.frame with columns service, outcome, n_cases, share_within_service.

Examples

if (FALSE) {
  siu <- read.csv("SIU.csv")
  mrm_siu_outcome_classifier(siu)
}