Skip to contents

Builds the (id x fiscal year) cell frame with the shared Ruhela builder, morie_otis_make_pair_alert_to_volatility_ruhela, so treatment and outcome are the canonical ones: treatment T_high_ac = 1 when the person-year's alert complexity ac (the number of distinct MentalHealth x SuicideRisk x SuicideWatch alert combinations across its rows, the no-alert combination included) is at least 2; outcome Y_vm_count = the number of region changes in the person-year (rows whose Region_AtTimeOfPlacement differs from Region_MostRecentPlacement, plus changes of Region_AtTimeOfPlacement from one row to the next). It then fits Poisson and negative-binomial GLMs of Y_vm_count on T_high_ac adjusting for Year, Gender, and Age, the NB fit through the native morie_glm_nb.

Usage

morie_otis_irr_glmm_vm(df)

Arguments

df

b01 (or a01) data.frame.

Value

morie_otis_result.

Details

No random effect / cluster-robust SE – for paper-grade inference, use the dedicated OTIS DML pipeline.

Examples

b01 <- morie_synth_otis("b01", n = 120L, seed = 1L)
res <- morie_otis_irr_glmm_vm(b01)
res$title
#> [1] "IRR Poisson/NB GLM -- vm ~ T_high_ac + demog"