# plot.coxphw

##### Plot Weights of Weighted Estimation in Cox Regression

This function plots the weights used in a weighted Cox regression analysis against time.

- Keywords
- survival

##### Usage

```
# S3 method for coxphw
plot(x, rank = FALSE, log = FALSE, legendxy = NULL,...)
```

##### Arguments

- x
a

`coxphw`

object.- 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

##### Details

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.

##### Value

No output value.

##### Note

In coxphw version 4.0.0 the new `plot`

function replaces the old `plotw`

function.

##### See Also

##### Examples

```
# NOT RUN {
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)
# }
```

*Documentation reproduced from package coxphw, version 4.0.1, License: GPL-2*