Skip to contents

Run all OTIS-TPS overlay analyses

Usage

morie_otis_tps_analyze_all(otis_b01, tps_datasets, out_dir = NULL)

Arguments

otis_b01

OTIS b01 data.frame.

tps_datasets

Named list of TPS data.frames (one per category).

out_dir

Optional output directory for overlay_<name>.rds.

Value

Named list of morie_otis_analysis_results (region_rollup, yoy_correlation).

Examples

set.seed(2026)
b01 <- data.frame(
  EndFiscalYear = rep(2023:2025, each = 30),
  Region_AtTimeOfPlacement = sample(c("Toronto", "Central", "Eastern"), 90, TRUE),
  NumberConsecutiveDays_Segregation = sample(1:25, 90, TRUE))
tps <- list(assault = data.frame(OCC_YEAR = rep(2020:2025, times = 200)))
res <- morie_otis_tps_analyze_all(b01, tps)
names(res)
#> [1] "region_rollup"   "yoy_correlation"