compute_cde: Compute CDE from theta_0 and theta_1

View source: R/oc_analyses.R

compute_cdeR Documentation

Compute CDE from theta_0 and theta_1

Description

Computes Controlled Direct Effect as the ratio of average hazard contributions on the natural scale: CDE(S) = mean(exp(theta_1[S])) / mean(exp(theta_0[S])).

Usage

compute_cde(df, subset_indicator = NULL)

Arguments

df

Data frame with theta_0 and theta_1 columns.

subset_indicator

Optional logical/integer vector for subsetting. If provided, only rows where subset_indicator == 1 are used.

Value

Numeric CDE value, or NA_real_ if columns are missing.


forestsearch documentation built on Nov. 15, 2026, 9:06 a.m.