VEplot {kyotil} | R Documentation |
Vaccine efficacy plots.
VEplot (object, ...) ## S3 method for class 'cox.zph' VEplot(object, resid = TRUE, se = TRUE, df = 4, nsmo = 40, var, ylab="VE", xlab="Time", xaxt="s", cex.axis=1, ...) myplot.cox.zph (x, resid = TRUE, se = TRUE, df = 4, nsmo = 40, var, coef.transform=NULL, ylab=NULL, xlab="Time", xaxt="s", cex.axis=1, ...)
object |
An object |
x |
An object of type cox.zph |
resid |
Boolean, whether to plot residuals |
se |
Boolean, whether to plot confidence band |
df |
degrees of freedom |
nsmo |
number of points used to plot the fitted spline |
var |
estimated variance matrix from the Cox model fit |
xlab |
x label |
xaxt |
x axis |
cex.axis |
cex for axis |
ylab |
y label |
coef.transform |
a function to transform Cox hazard ratio estimate |
... |
additional parameters |
VEplot and myplot.cox.zph are extensions of survival::plot.cox.zph to plot VE curve and other transformations.
myplot.cox.zph adds the following parameters to the original list of parameters in plot.cox.zph: coef.transform: a function to transform the coefficients ylab: y axis label xlab: x axis label
Youyi Fong, Dennis Chao
Durham, Longini, Halloran, Clemens, Azhar and Rao (1998) "Estimation of vaccine efficacy in the presence of waning: application to cholera vaccines." American Journal of Epidemiology 147(10): 948-959.
library(survival) vfit <- coxph(Surv(time,status) ~ trt + factor(celltype) + karno + age, data=veteran, x=TRUE) temp <- cox.zph(vfit) par(mfrow=c(2,2)) for (v in c("trt","age")) { VEplot(temp, var=v, resid=FALSE, main=v, ylab="VE", cex.axis=1.5) plot(temp, var=v, resid=FALSE, main=v) }