Skip to contents

Implements Ruhela's "ac >= 2 -> vm" RF (Ruhela Formulation): the 8-state combo encoding documented in OTIS-RC/notez1a.qmd and used for the published res_pool / res_by_year / res_all estimates. Per (UniqueIndividual_ID, EndFiscalYear), the alert-state complexity ac is the number of distinct alert combos with positive support across that person-year's rows (NOT the max of simultaneous flags – see the Naive arm for that alternative). Treatment T_high_ac = 1L iff ac >= 2. Outcome Y_vm_count sums the within-row and across-row regional-volatility-move indicators.

Usage

morie_otis_make_pair_alert_to_volatility_ruhela(df)

Arguments

df

OTIS placement-level data.frame (b01 / a01 schema).

Value

A named list with elements data (the person-year data.frame), T = "T_high_ac", Y = "Y_vm_count", and covariates = c("Gender", "Age_Category", "EndFiscalYear").

Examples

if (FALSE) { # \dontrun{
  df <- morie_otis_load()
  pair <- morie_otis_make_pair_alert_to_volatility_ruhela(df)
  morie_otis_irm_dml(pair$data, treatment = pair$T,
                     outcome = pair$Y, covariates = pair$covariates)
} # }