coxphQuantile {clinfun} | R Documentation |
Drwas a quantile curve of survival distribution as a function of covariate.
coxphQuantile(phfit, xrange, p=0.5, whichx=1, otherx=NULL, ngrid=256, ...)
phfit |
output from a proportional hazards fit. |
xrange |
the range of covariate values for which the quantiles of survival times are computed. |
p |
the probability level for the quantile (default is median). |
whichx |
if there are more than one covariates in the Cox model, the one chosen for the quantile plot. |
otherx |
the values for other covariates in the Cox model. If missing uses their average values. |
ngrid |
number of points at which quantile is calculated. |
... |
additional parameters to be passed on to the lines command. |
This function is used to draw quantile curves and has no output.
Heller G. and Simonoff J.S. (1992) Prediction in censored survival data: A comparison of the proportional hazards and linear regression models. Biometrics 48, 101-115.
## Not run: library(survival) data(pbc) pbcfit <- coxph(Surv(time, status) ~ trt + log(copper), pbc, subset=(trt>0 & copper>0)) plot(log(pbc$copper[pbc$trt>0 & pbc$copper>0]), pbc$time[pbc$trt>0 & pbc$copper>0], pch=c("o","x")[1+pbc$status[pbc$trt>0 & pbc$copper>0]], xlab="log Copper", ylab="Survival time") coxphQuantile(pbcfit, c(2.5,6), whichx=2, otherx=1) coxphQuantile(pbcfit, c(2.5,6), p=0.75, whichx=2, otherx=2, col=2) ## End(Not run)