Returns the effective hazard ratio at a given time on treatment, accounting for waning of treatment effect.
waning_hr(base_hr, time_on_tx, start, duration, type = "linear")Numeric scalar: effective HR at time_on_tx.
Numeric. Initial treatment HR (< 1 means benefit).
Numeric. Time the patient has been on treatment.
Numeric. Time at which waning begins (HR = base_hr before this).
Numeric. Duration of the waning period (HR reaches 1 at start + duration).
Character. Waning function: "linear" (default),
"exponential", or "instant".