Skip to contents

b07 aggregate Ruhela (pivot to long): With-alert -> seg placements

Usage

morie_otis_analyze_b07_ruhela_aggregate(data, out_dir = NULL)

morie_otis_analyze_b07_mrm_aggregate(data, out_dir = NULL)

Arguments

data

b07 data.frame.

out_dir

Optional.

Value

morie_otis_analysis_result.

Examples

# \donttest{
otis_b07 <- morie_synth_otis("b07", n = 120L, seed = 1L)
morie_otis_analyze_b07_ruhela_aggregate(otis_b07)
#> OTIS b07 -- Aggregate Ruhela formulation: With-alert vs without-alert x gender -> Number of segregation placements
#> ==================================================================================================================
#>   Source file                            b07_segregation_placements_alerts_and_hold_flags_by_gender.csv
#>   Dataset id                             b07
#>   Treatment column                       T_alert
#>   Outcome (count)                        n_placements
#>   Year FE                                EndFiscalYear
#>   Covariate FEs                          Alert_Type, Gender
#>   Cluster group (GEE)                    --
#>   Cells                                  240
#>   Total outcome count                    9464
#>   Overdispersion (Poisson AIC - NB AIC)  2932.8
#> 
#> Aggregate Ruhela formulation -- Poisson + NB IRR for treatment effect on count outcome:
#>   Family   Coefficient       IRR     95% CI          p-value   AIC     Notes
#>   ----------------------------------------------------------------------------------------
#>   Poisson  factor(T_alert)1  0.9255  [0.889, 0.964]  1.69e-04  5175.2  n=240, total_y=9464
#>   NB       factor(T_alert)1  0.9128  [0.751, 1.109]  3.59e-01  2242.4  n=240, total_y=9464
#> 
#> Aggregate RF on b07 testing alert-flagged vs no-alert placements in the same gender x alert-type stratum.
#> 
#> IRR > 1 ==> treatment increases the count rate; IRR < 1 ==> treatment decreases it. Concordance between Poisson and NB indicates equidispersion; large gap (Poisson AIC > NB AIC) indicates overdispersion -- trust NB. 
# }