This function generates a plot comparing nonparametric and parametric estimations of cure probability in a univariate setting. The nonparametric estimate is displayed with 95% confidence bands, while the parametric estimate is based on a logit, probit or complementary log-log link. An optional covariate density curve can be added as a secondary axis.
plotCure(
x,
time,
delta,
main.title = NULL,
title.x = NULL,
model = "logit",
theta = NULL,
legend.pos = "bottom",
density = TRUE,
hsmooth = 10,
npoints = 100
)A ggplot object representing the cure probability plot.
A numeric vector containing the covariate values.
A numeric vector representing the observed survival times.
A binary vector indicating the event status (1 = event, 0 = censored).
Character string for the main title of the plot. If NULL, a default is used.
Character string for the x-axis label. If NULL, a default is used.
A character string indicating the assumed model. Options include "logit", "probit", and "cloglog". Defaults to "logit".
A numeric vector of length 2, specifying the coefficients for the logistic model to generate the parametric estimate.
A character string indicating the position of the legend. Options include "bottom", "top", "left", "right", "none", etc.
Logical; if TRUE, adds a secondary y-axis with the covariate density curve.
Numeric. Smoothing bandwidth parameter (h) for the cure probability estimator.
Integer. Number of points at which the estimator is evaluated over the covariate range.
The function estimates the cure probability nonparametrically using the probcure function
and overlays it with a parametric estimate obtained from a logistic regression model.
Confidence intervals (95%) are included for the nonparametric estimate. Optionally,
the density of the covariate can be shown as a shaded area with a secondary y-axis.
probcure