Weighted Kaplan-Meier estimator with discrete time-independent covariate

1 2 |

`times` |
a vector of evaluation times |

`data` |
data frame containing the variables in formula (if is.null(formula) expected column names are: Y (time), D (status), W (strat. factor), V (left-truncation times)) |

`param` |
list of parameters containing: alpha: fractional parameter (default=1) var: if TRUE (default) calculate variance estimate cov: if FALSE (default) do not calculate covariance matrix estimate left.limit: if TRUE calculate left-continuous estimates, else calculate right-continuous estimates rr.subset: logical vector defining subset of observations to use for response rate estimation (default: use all observations) |

`formula` |
an object of class '"formula"' specifying the conditional survival model (only discrete covariates supported) |

This function calculates the weighted Kaplan-Meier estimator for the survival function with weights based on a discrete time-independent covariate as described in Murray/Tsiatis (1996).
The survival probabilities are evaluated at each entry in the vector `times`

. The data frame `data`

must either contain the variable in `formula`

or, if `formula`

is `NULL`

,
the variables `V`

(left-truncation time), `Y`

(censored failure time), `D`

(censoring indicator), `W`

(stratification variable).
If `var`

is `TRUE`

then an estimate of the asmyptotic variance is calculated for each entry in vector `times`

. If `cov`

is `TRUE`

then the `n x n`

asymptotic
covariance matrix is estimated, where `n`

is the length of vector `times`

. If `left.limit`

is `TRUE`

then a left-continuous estimate of the survival function is calculated instead
of a right-continuous estimate (default). If a logical vector `rr.subset`

is supplied, then only a subset of observations is used to estimate the response rates.

an object of class '"wkm"'

S.~Murray and A.~A. Tsiatis. Nonparametric survival estimation using prognostic longitudinal covariates. *Biometrics*, 52(1):137–151, Mar. 1996.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.