permIPZ: Convenience function which calls createPermGS and nextStage...

Description Usage Arguments Value Examples

View source: R/permLR.R

Description

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

Usage

1
2
3
4
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

Value

An object of class permGS

Examples

1
2
3
4
5
6
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)

mbrueckner/permGS documentation built on Aug. 7, 2017, 3:22 p.m.