IPW (Inverse Probability Weighting)
Use the synthetic data setup first; it defines data and the columns used below. These are advanced direct R examples.
Use propensity-based weights to adjust for measured confounders. Inspect overlap, weight extremes and effective sample size before interpreting the estimates.
ipw_result <- causal_ipw(data, "Immunotherapy", "Response",
confounders = c("Age", "Sex", "Stage", "ECOG"),
outcome_type = "binary",
stabilize = TRUE) # Use stabilized weightsRead the result
The wrapper parameter is stabilize. Inspect positivity, raw and truncated weights and effective sample size. A binary-exposure survival HR is a limited weighted Cox summary; continuous-exposure primary survival estimation is not implemented for this method.
See effect scales and reporting, diagnostics and the current support reference.