survPHplot {biostat3} | R Documentation |
Plot to assess non-proportionality
Description
Plot of log(time) versus -log(-log(survival)) to assess non-proportionality. A constant distance between curves suggest proportionality.
Usage
survPHplot(formula, data, subset, contrasts, weights, col = 1:5,
lty = 1:5, pch = 19, xlab = "Time (log scale)",
ylab = "-log(-log(Survival))", log = "x",
legend.args = list(), ...)
Arguments
formula |
either (i) formula with a |
data |
data argument passed to |
subset |
subset argument passed to |
contrasts |
contrasts argument passed to |
weights |
weights argument passed to |
col |
colours of the curves passed to |
lty |
line type of the curves passed to |
pch |
pch for the curves passed to |
xlab |
xlab graphics argument passed to |
ylab |
ylab graphics argument passed to |
log |
log graphics argument passed to |
legend.args |
list of arguments passed to |
... |
Other arguments passed to |
Details
The default plot is to use straight lines between the transformed survival values for each strata, rather than using steps.
Value
Primary purpose is for plotting (side effect). The return value is initial plot.
Examples
survPHplot(Surv(surv_mm/12, status == "Dead: cancer") ~ year8594,
data=colon, subset=(stage=="Localised"),
legend.args=list(bty="n"))