TwoSSP | R Documentation |
This function creates a two-samle survival probability curve for data from randomized controlled trials and has options to estimate the AUC, diagnose the proportional hazard assumptions and more.
TwoSSP( time, event, group, area = TRUE, silent = FALSE, CI = FALSE, level = 0.95, B = 1000, checkPH = FALSE, compare = FALSE, abtwc = FALSE, xlab = NULL, ylab = NULL, main = NULL, cex.axis = 1.5, cex.lab = 1.5, legend.inset = 0.02, legend.cex = 1.5, lty = c(2, 1, 3), lwd = 1.5 )
time |
Time to event or censoring. |
event |
An indicator vector with values of 1 for individuals who had the event occur or 0 if the participant was censored. |
group |
An indicator vector with values of 1 if the the participant was in the treatment arm and 0 otherwise. |
area |
Logical argument to indicate if user wants an estimate for area under the curve (default is TRUE). |
silent |
Logical argument, FALSE indicates the user wants plots and TRUE indicates no plots only AUC calculations (default is FALSE). |
CI |
Logical argument indicating if user wants bootstrap errors and confidence intervals to be calculated for the curve and AUC. Default is FALSE. |
level |
Numerical argument indicating condifence level for the confidence interval. Default is 0.95. It's ignored if CI=FALSE. |
B |
Number of bootstrap samples to use for confidence interval and error calculations. Default is 1000. It's ignored if CI=FALSE. |
checkPH |
Logical argument to indicate if user wants to compare the nonparametric curve with the curve based on the proportional hazards model (default is FALSE). |
compare |
Logical argument to indicate if user wants want to compare the nonparametric curve with curves based on a proportional hazards model, proportional odds model, and various AFT models (default is FALSE). |
abtwc |
Logical argument to indicate if area between curves is needed as part of model comparisons (checkPHM or compare must be TRUE). |
xlab |
String argument for the horizontal axis label of the ROC curve. |
ylab |
String argument for the vertical axis label of the ROC curve. |
main |
String argument for the title of the ROC curve. |
cex.axis |
Optional graphical parameter for magnification of axis annotation. See par for more details. |
cex.lab |
Optional graphical parameter for magnification of x and y labels. See par for more details. |
legend.inset |
Optional graphical parameter controling the inset of the legend. |
legend.cex |
Optional graphical parameter for magnification of the legend's text. |
lty |
Optional graphical parameter to set the type of line to use. Can be a number or a vector. See par for more details. |
lwd |
Optional graphical parameter for line width relative to the default. See par for more details. |
A plot of the ROC curve (if silent=FALSE
) and an ROCsurv object containing:
A survfit object containing the survival curve for the treatment group.
A survfit object containing the survival curve for the control group.
The area under the curve (AUC).
A matrix representation of the two-sample survival probability curve R_u
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.