twosamplesurvpvs function

Two Sample Omnibus Tests of Survival Curves

Two Sample Omnibus Tests of Survival Curves

Returns the Kolmogorov-Smirnov and Anderson-Darling test statistics for two right-censored data sets.

twosamplesurvpvs(times, delta, grp, nmc = 10000, plotme = TRUE, exact = FALSE)

Arguments

  • times: Event and censoring times
  • delta: Indicator of event (1) or censoring (0).
  • grp: Variable that divides the population into groups.
  • nmc: Number of Monte Carlo samples for p value calculation
  • plotme: logical; indicates whether to plot or not.
  • exact: logical; indicates whether to use exhaustive enumeration of permutations or not.

Returns

A vector of length two, with the Kolmogorov-Smirnov and Anderson-Darling statistics.

Details

The function calls a Fortran code to calculate the estimators b and their variance-covariance matrix Vb

Examples

twosamplesurvpvs(rexp(20),rbinom(20,1,.5),rbinom(20,1,.5))
  • Maintainer: John E. Kolassa
  • License: GPL-2
  • Last published: 2023-08-30

Useful links