sim_BSSRed: Simulation

Description Usage Arguments Value

View source: R/sim_BSSRed.R

Description

Simulation

Usage

1
2
3
sim_BSSRed(N, tn, M, tm, addRecT, sim.lambdaP, sigma=1, theta.star, gamma, kappa=1,
           distS=c("exponential","weibull"), distC=c("exponential","weibull"),
           nEvents, L, nSim=100, par.est=FALSE, fixed.min.studytime=TRUE, seed=235711)

Arguments

addRecT

a vector defining the allowed additional recruitment batches.

sigma

a number defining the shape parameter of the survival prozess.

theta.star

a number defining the true hazard ratio.

gamma

a number defining the hazard of the censor process.

kappa

a number defining the shape parameter of the censor prozess.

distS

a string defining the distribution of the survival process. Default is "exponential".

distC

a string defining the distribution of the censor process. Default is "exponential".

nEvents

a number defining the targeted number of events. (alternatively alpha, beta)

L

a number defining the administrative censoring time.

nSim

a number defining the number of simulations per parametrisation.

par.est

a boolean. If TRUE the parameter-estimates and teststatistik will be calculated. Warning: will greatliy increase runtime.

fixed.min.studytime

a boolean. If TRUE the simulated studies will not stop before L. If FALSE the study will end when the targeted amount of events is reached.

seed

a number defining the seed.

N

a two-column matrix which represents the size of recruitment per group.

tn

a vector of length NROW(N) defining the timepoint of each recruitment-batch.

M

a matrix defining the ongoining recruitment after the planned N. Default is the last row of N.

tm

a vector of length NROW(M) defining the timepoint of each future recruitment-batch. Default is the next equidistant timepoint after the last of tn.

sim.lambdaP

a vector defining the hazard rates of the control group.

Value

a list containing the results of each simulation as a data.frame.


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