mhazard (version 0.1.2)

KM2: Estimates the survival function for a bivariate outcome

Description

Computes the survival function for a bivariate outcome using one of three possible estimators. The survival function for a bivariate outcome is analogous to the Kaplan-Meier estimator for a univariate outcome. Optionally (bootstrap) confidence intervals for the survival function may also be computed.

Usage

KM2(
  Y1,
  Y2,
  Delta1,
  Delta2,
  newT1 = NULL,
  newT2 = NULL,
  estimator = c("dabrowska", "volterra", "prentice-cai"),
  conf.int = FALSE,
  R = 1000,
  ...
)

Arguments

Y1, Y2

Vectors of event times (continuous).

Delta1, Delta2

Vectors of censoring indicators (1=event, 0=censored).

newT1, newT2

Optional vectors of new times at which to estimate the survival function. Defaults to the unique values in Y1/Y2 if not specified.

estimator

Which estimator of the survival function should be used. Possible values include "dabrowska", "volterra", and "prentice-cai". Defaults to "dabrowska".

conf.int

Should bootstrap confidence intervals be computed?

R

Number of bootstrap replicates. This argument is passed to the boot function. Defaults to 1000. Ignored if conf.int is FALSE.

...

Additional arguments to the boot function.

Value

A list containing the following elements:

T1:

Unique values of Y1 at which Fhat was computed

T2:

Unique values of Y2 at which Fhat was computed

Fhat:

Estimated survival function (computed at T1, T2)

Fhat.lci:

Lower 95% confidence bounds for Fhat

Fhat.uci:

Upper 95% confidence bounds for Fhat

Fmarg1:

Estimated marginal survival function for variable 1 (computed at newT1)

Fmarg1.lci:

Lower 95% confidence bounds for Fmarg1

Fmarg1.uci:

Upper 95% confidence bounds for Fmarg1

Fmarg2:

Estimated marginal survival function for variable 2 (computed at newT2)

Fmarg2.lci:

Lower 95% confidence bounds for Fmarg2

Fmarg2.uci:

Upper 95% confidence bounds for Fmarg2

Fhat_est:

Estimated survival function (computed at newT1, newT2)

Fhat_est.lci:

Lower 95% confidence bounds for Fhat_est

Fhat_est.uci:

Upper 95% confidence bounds for Fhat_est

CR:

Estimated cross ratio (computed at T1, T2)

KT:

Estimated Kendall\'s tau (computed at T1, T2)

CR_est:

Estimated cross ratio (computed at newT1, newT2)

KT_est:

Estimated Kendall\'s tau (computed at newT1, newT2)

Details

If conf.int is TRUE, confidence intervals will be computed using the boot function in the boot package. Currently only 95% confidence intervals computed using the percentile method are implemented. If conf.int is FALSE, confidence intervals will not be computed, and confidence bounds will not be returned in the output.

References

Prentice, R., Zhao, S. "Nonparametric estimation of the multivariate survivor function: the multivariate Kaplan<U+2013>Meier estimator", Lifetime Data Analysis (2018) 24:3-27. Prentice, R., Zhao, S. "The statistical analysis of multivariate failure time data: A marginal modeling approach", CRC Press (2019).

See Also

boot

Examples

Run this code
# NOT RUN {
x <- genClayton2(1000, 0, 1, 1, 2, 2)
x.km2 <- KM2(x$Y1, x$Y2, x$Delta1, x$Delta2)
# }
# NOT RUN {
x.km2.ci <- KM2(x$Y1, x$Y2, x$Delta1, x$Delta2, conf.int=TRUE)
# }

Run the code above in your browser using DataCamp Workspace