btEstimate: Blinded Study Time Estimation

Description Usage Arguments Value Examples

View source: R/btEstimate.R

Description

!!!!!!!!!!!!! shall not be exported !!!!!!!!!!!!!!!!!!!

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
btEstimate(
  dfSurv,
  theta.star,
  N,
  tn,
  M,
  tm,
  nEvents,
  L = L,
  sigma = sigma,
  distS = distS,
  gamma = gamma,
  kappa = kappa,
  distC = distC
)

Arguments

dfSurv

a data.frame containing the variables:

  • status: (0,1) := (no event,event)

  • time: time to status

  • group: grouping variable for a

theta.star

a number greater 0 defining the assumed hazard ratio.

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.

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.

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.

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 rate for the censor process.

from

a number defining the minimum recruitment time.

lambda

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

Value

a number defining the minimum recruitmenttime, given the recruitments N, rn and the blinded estimation of the event rates from the supplied data.frame.

Examples

1
2
3
4
5
6
N <- matrix(rep(50,20),ncol=2)
tn <- 0:(NROW(N)-1)
dfSurv <- simSurvData(N=N, lambda=exp(.7)/12, sigma=1, theta=.7, gamma=exp(.8)/12, kappa=1, distS = "exponential",distC = "exponential",L=10)
btEstimate(dfSurv=dfSurv, theta.star=.7, N=N, tn=tn, nEvents=40, L=20,
           sigma=1, distS="exponential",
           gamma=-log(.3)/24, kappa=1, distC="exponential")

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