plot.coxphw {coxphw} | R Documentation |
This function plots the weights used in a weighted Cox regression analysis against time.
## S3 method for class 'coxphw'
plot(x, rank = FALSE, log = FALSE, legendxy = NULL,...)
x |
a |
rank |
if set to TRUE, plots the weights against ranked time. Default is FALSE. |
log |
if set to TRUE, shows logarithm of weights. Default is FALSE. |
legendxy |
an optional vector of length 2 of the x and y co-ordinates to be used to position the legend. |
... |
additional arguments for plotting |
The function plots the survival weights, i.e., the left-continuous survivor function estimates, the censoring weights, i.e., estimates of the follow-up distribution obtained by Kaplan-Meier estimation with reversed meaning of the status indicator and the combined normalized weights, i.e. the product of the survival and the censoring weights, rescaled to a mean of 1.
No output value.
In coxphw version 4.0.0 the new plot
function replaces the old plotw
function.
Georg Heinze, Daniela Dunkler
data("gastric")
# weighted estimation of average hazard ratio
fit1 <- coxphw(Surv(time, status) ~ radiation, data = gastric, template = "AHR")
plot(fit1)
# estimation of average regression effect by inverse probability of censoring weights;
# truncate weights at 95th percentile
fit2 <- coxphw(Surv(time, status) ~ radiation, data = gastric, template = "ARE",
trunc.weights = 0.95)
plot(fit2)