
Identify the treatment coefficient of a piecewise SCD model
Source:R/utils-priors.R
treatment_coef.RdPicks the first numeric treatment-onset column among level_AB, the
reversal onset step, changing-criterion steps, alternating-treatment
dummies, treatment, and phase_num. When formula_str is
supplied, only columns that appear as formula terms qualify.
Examples
treatment_coef(data.frame(level_AB = c(0, 1), outcome = c(1, 2)))
#> [1] "level_AB"