wkm: wkm

Description Usage Arguments Details Value References

View source: R/wkm.R


Weighted Kaplan-Meier estimator with discrete time-independent covariate


wkm(times, data, param = list(alpha = 1, var = TRUE, cov = FALSE,
  left.limit = FALSE, rr.subset = rep(TRUE, nrow(data))), formula = NULL)



a vector of evaluation times


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))


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)


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.

AHR documentation built on May 2, 2019, 2:38 a.m.

Related to wkm in AHR...