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 Surv object on the left-hand-side and stratification covariates on the right-hand-side, or (ii) a survfit object

data

data argument passed to survfit

subset

subset argument passed to survfit

contrasts

contrasts argument passed to survfit

weights

weights argument passed to survfit

col

colours of the curves passed to lines

lty

line type of the curves passed to lines

pch

pch for the curves passed to points

xlab

xlab graphics argument passed to plot.default

ylab

ylab graphics argument passed to plot.default

log

log graphics argument passed to plot.default

legend.args

list of arguments passed to legend. These arguments update the base arguments, which are list(x="topright",legend=names(survfit$strata),col=col,lty=lty,pch=pch)

...

Other arguments passed to plot.default

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"))

[Package biostat3 version 0.1.9 Index]