permIPZ function

Convenience function which calls createPermGS and nextStage to perform fixed sample size permutation test with IPZ method

Convenience function which calls createPermGS and nextStage to perform fixed sample size permutation test with IPZ method

permIPZ(formula, data, B = 1000, alpha = 0.05, pool = TRUE, type = c("logrank", "Gehan-Breslow", "Tarone-Ware", "Prentice", "Prentice-Marek", "Andersen-Borgan-Gill-Keiding", "Fleming-Harrington", "Self"))

Arguments

  • formula: a formula object, as used by coxph, left hand side must be a 'Surv' object, right hand side must only consist of a factor (treatment indicator) and optionally a special strata() term identifying the permutation strata
  • data: a data.frame or list containing the variables in "formula", by default "formula" is evaluated in the parent frame
  • B: number of random permutations (default: 1000)
  • alpha: significance level (default: 0.05)
  • pool: if TRUE impute event times from Kaplan-Meier estimator calculated from pooled data
  • type: logrank weights to be used with coin::logrank_trafo

Returns

An object of class permGS

Examples

T <- rexp(30) ## event times Z <- rbinom(30, 1, 0.5) ## treatment assignment C <- rexp(30) ## drop-out times data <- data.frame(time=pmin(T,C), status=T<=C, Z=Z) x <- permIPZ(Surv(time, status) ~ Z, data) summary(x)
  • Maintainer: Matthias Brueckner
  • License: GPL-3 | file LICENSE
  • Last published: 2017-08-07

Useful links