Skip to contents

Implements Ruhela's "ac >= 2 -> vm" RF (Ruhela Formulation): the 8-state encoding of the three alert flags. 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 (requireNamespace("readr", quietly = TRUE)) {
  # \donttest{
  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)
  # }
}
#> $ate
#> [1] 0
#> 
#> $ate_se
#> [1] 0
#> 
#> $ate_pval
#> [1] 1
#> 
#> $ate_ci95
#> [1] 0 0
#> 
#> $atte
#> [1] 0
#> 
#> $atte_se
#> [1] 0
#> 
#> $atte_pval
#> [1] 1
#> 
#> $atte_ci95
#> [1] 0 0
#> 
#> $atc
#> [1] 0
#> 
#> $atc_se
#> [1] 0
#> 
#> $atc_pval
#> [1] 1
#> 
#> $atc_ci95
#> [1] 0 0
#> 
#> $n
#> [1] 5
#> 
#> $n_treated
#> [1] 0
#> 
#> $p_treat
#> [1] 0
#> 
#> $se_kind
#> [1] "iid"
#> 
#> $ml_outcome
#> [1] "ols"
#> 
#> $ml_propensity
#> [1] "logit"
#>