simSurvData: Simulation of a Survival Data.Frame

Description Usage Arguments Details Value Examples

View source: R/simSurvData.R

Description

Simulates a two group data.frame including time to event, recruiting time and status.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
simSurvData(
  N,
  tn,
  lambda,
  sigma,
  theta,
  gamma,
  kappa,
  distS = "exponential",
  distC = "exponential",
  L
)

Arguments

N

a two column matrix containing the size of both recruitment groups per row, representing the number of recruited patients per group and timepoint (tn).

tn

a vecotr of length = NROW(N) defining the timepoint of recruiting. Default is 0:(NROW(N)-1).

lambda

a number greater 0 defining the hazard rate for the survival process of group1. For the parametrization see details.

sigma, kappa

a number greater 0 defining the shape parameter for the survival- and the censor process. Only needed if distS or distC is set to weibull. Default is 1 resulting in an exponential distribution.

gamma

a number greater 0 defining the overall hazard rate for the censor process.

distS, distC

a character string defining the distribution of the survival- and the censor process. Default is 'exponential'.

L

a number defining the timepoint for administrative censoring. If no administrative censoring is planned L=Inf. Default is L=Inf.

Details

!!!!!!!!!!!!!!!!!!!!11how the data is simulated!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Value

a data.frame including id (id), time to event (time), recruiting timepoint (tn), grouping (group) and status (status (1 = event occured)).

Examples

1
2
N <- matrix(rep(50,10),ncol=2)
simSurvData(N=N, lambda=exp(.7)/12, sigma=1, theta=.7, gamma=exp(.3)/12, kappa=1, distS = "exponential",distC = "exponential",L=10)

Knusprikus/BSSRed documentation built on July 6, 2020, 11:02 p.m.