Skip to contents

Computes the gap (in days) between the incident date and the Director's decision date for every SIU case, dropping rows where either date is missing. Reports per-stratum median + IQR + n. Cases without a decision date as of the snapshot are right-censored if censor_open_cases = TRUE (default).

Usage

mrm_siu_case_to_decision_km(
  data,
  incident_col = "date_of_incident_iso",
  decision_col = "date_of_director_decision_iso",
  service_col = "police_service",
  censor_open_cases = TRUE,
  min_n = 5L
)

Arguments

data

A data.frame with the SIU case schema.

incident_col

Column with ISO incident date (default "date_of_incident_iso").

decision_col

Column with ISO Director's decision date (default "date_of_director_decision_iso").

service_col

Stratifying jurisdiction column (default "police_service").

censor_open_cases

Logical (default TRUE). If TRUE, rows with missing decision_col contribute right-censored observations from incident to the most recent decision date in the data set. If FALSE, they are dropped.

min_n

Minimum cases per service to retain in the per-service summary (default 5L).

Value

A list with elements:

  • pooled: a single-row data.frame with the pooled median, mean, IQR, n, n_censored.

  • by_service: per-service data.frame with the same columns.

Details

This is the substantive "time-to-outcome" analysis the MA-thesis "210-day TTR" claim should have been; it operates on real per-case dates with a stable jurisdiction identifier.

Examples

if (FALSE) {
  siu <- read.csv("SIU.csv")
  res <- mrm_siu_case_to_decision_km(siu)
  head(res$by_service)
}