COCA (Correlated Outcome Control Approach) regresses the negative
control W on the outcome Y (W ~ y + X) and recovers the causal
effect as a ratio \(-\hat\beta_X / \hat\beta_Y\). This places the
outcome on the right-hand side of the regression, which is
structurally impossible when the outcome is a survival::Surv
object (time-to-event). COCA is therefore unsupported for survival
outcomes and always returns list(beta=NA, se=NA, pvalue=NA).
Examples
set.seed(1)
dat <- generate_toy_data(n = 200, outcome_type = "survival", seed = 1)
fit_coca_surv(dat$surv_time, dat$surv_event, dat$X, dat$W[, 1])
#> $beta
#> [1] NA
#>
#> $se
#> [1] NA
#>
#> $pvalue
#> [1] NA
#>
#> attr(,"reason")
#> [1] "COCA regresses W on Y (W ~ y + X), placing the outcome on the RHS, which is impossible with a Surv object. COCA is unsupported for survival outcomes."
# $beta [1] NA (COCA unsupported for survival outcomes)
