plot.cpf {Cprob} | R Documentation |
A plot of conditional probability curves is produced, one for each strata. Pointwise confidence intervals and legend can also be displayed
## S3 method for class 'cpf' plot(x, conf.int = FALSE, mark.time = FALSE, mark = 3, col = 1, lty, ci.lty = 3, xlim, ylim = c(0, 1), xlab = "", ylab = "", bty = "n", legend = TRUE, curvlab = NULL, legend.pos = NULL, legend.bty = "n", ...)
x |
An object of class |
conf.int |
A logical indicating whether to plot a pointwise confidence interval. Default is FALSE |
mark.time |
Controls the labelling of the curves. If set to TRUE, then the curves are marked at each occurrence of a competing event |
mark |
Mark parameter which will be used to label the curve. The
same as |
col |
Vector of colours for the curves |
lty |
Vector of integers specifying the line types |
ci.lty |
A vector of integer controlling the line types for the pointwise confidence intervals |
xlim |
x-axis limits for the plot area. Default is c(0, 1) |
ylim |
y-axis limits for the plot area |
xlab |
x-axis label |
ylab |
y-axis label |
bty |
see |
legend |
Whether or nor draw a legend. Default is TRUE |
curvlab |
Text for legend |
legend.pos |
Position for the legend. Default is the upper left corner |
legend.bty |
Box type. See |
... |
Further arguments for plot |
No value returned
Arthur Allignol, arthur.allignol@gmail.com
data(mgus) mgus$A <- ifelse(mgus$age < 64, 0, 1) fit <- cpf(Hist(time, ev)~A, mgus) plot(fit, curvlab = c("Age < 64", "Age >= 64"), main = "Conditional Probability of Cancer", xlab = "Years")