rEstimate: Recruitment Time Estimation

Description Usage Arguments Value Examples

View source: R/rEstimate.R

Description

Calculates the minimum recruitment time and number of patients needed to achieve the targeted number of events befor administrative study end.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
rEstimate(
  N,
  tn,
  M,
  tm,
  theta,
  nEvents,
  L,
  from = 1,
  lambda,
  sigma = 1,
  distS = "exponential",
  gamma,
  kappa = 1,
  distC = "exponential"
)

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 (t).

tn

a vecotr of length = NROW(N) defining the timepoint of recruiting.

M

a two column matrix containing the size of both recruitment groups per row, representing the number of future recruited patients per group and timepoint (tm). If not defined it will be taken from the last row of N.

tm

a vecotr of length = NROW(M) defining the timepoint of future recruiting. If not defined it will be interpolated from the last two entries of tn.

theta

a number greater 0 defining the assumed hazard ratio.

nEvents

a number greater 0 defining the targeted number of events to achieve the planned power.

L

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

from

a number > 0 defining the minimum number of recruitment steps. Default is 1, starting with the first recruited batch of patients.

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.

distS, distC

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

gamma

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

Value

a list with the minimum needed batches of recruits defined by N (rec_batch), the minimum time for recruitment dependend on tn (rec_time) and the minimum amount of patients (rec_total_number).

Examples

1
2
3
4
5
N <- matrix(rep(50,20),ncol=2)
tn <- 0:(NROW(N)-1)
rEstimate(N=N, tn=tn, theta=.7, nEvents=40, L=20, from = 1,
          lambda=-log(.7)/24, sigma=1, distS="exponential",
          gamma=-log(.3)/24, kappa=1, distC="exponential")

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