kyotil (version 2016.11-9)

VEplot: Vaccine Efficacy Plots

Description

Vaccine efficacy plots.

Usage

VEplot (object, ...) "VEplot" (object, resid = TRUE, se = TRUE, df = 4, nsmo = 40, var, ylab="VE", xlab="Time", ...)
myplot.cox.zph (x, resid = TRUE, se = TRUE, df = 4, nsmo = 40, var, coef.transform=NULL, ylab=NULL, xlab="Time", ...)

Arguments

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
ylab
y label
coef.transform
a function to transform Cox hazard ratio estimate
...
additional parameters

Details

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

References

Durham, L. Kathryn, et al. "Estimation of vaccine efficacy in the presence of waning: application to cholera vaccines." American Journal of Epidemiology 147.10 (1998): 948-959.

Examples

Run this code

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")
    plot(temp, var=v, resid=FALSE, main=v)
}

Run the code above in your browser using DataLab