Title: Design of Clinical Trials with Survival Endpoints Based on Binary Responses
Version: 1.3
Author: Marta Bofill Roig [aut, cre], Guadalupe Gomez Melis [ctb], Yu Shen [ctb]
Maintainer: Marta Bofill Roig <marta.bofillroig@meduniwien.ac.at>
Description: Sample size and effect size calculations for survival endpoints based on mixture survival-by-response model. The methods implemented can be found in Bofill, Shen & Gómez (2021) <doi:10.48550/arXiv.2008.12887>.
License: GPL-3
Encoding: UTF-8
LazyData: false
Imports: stats
RoxygenNote: 7.1.1
NeedsCompilation: no
Packaged: 2021-03-30 08:32:40 UTC; marta.bofill
Repository: CRAN
Date/Publication: 2021-03-31 08:40:02 UTC

Inside variance computation

Description

The following three functions are used to calculate the variance of th difference of two RMSTs. 'survw_integratef' is used for the integrations; 'inside_var' calculates the expression inside the integral; finally, 'var_f' computes the variance.

Usage

inside_var(t, ascale_r, ascale_nr, tau, bshape, ascale_cens, p)

Arguments

t

time at which the survival distribution is evaluated

ascale_r

scale parameter for the Weibull distribution for responders

ascale_nr

scale parameter for the Weibull distribution for non-responders

tau

follow-up

bshape

shape parameter for the Weibull distribution

ascale_cens

distributional parameter for the exponential distribution for the censoring

p

event rate for the response

Value

Variance computation

Author(s)

Marta Bofill Roig


Mean Weibull survival function

Description

The functions 'meanw_f' and 'medianw_f' calculate the mean and median for Weibull distributions, respectively.

Usage

meanw_f(ascale, bshape)

Arguments

ascale

scale parameter for the Weibull distribution

bshape

shape parameter for the Weibull distribution

Value

mean

Author(s)

Marta Bofill Roig


Median Weibull survival function

Description

The functions 'meanw_f' and 'medianw_f' calculate the mean and median for Weibull distributions, respectively.

Usage

medianw_f(ascale, bshape)

Arguments

ascale

scale parameter for the Weibull distribution

bshape

shape parameter for the Weibull distribution

Value

median

Author(s)

Marta Bofill Roig

The functions 'meanw_f' and 'medianw_f' calculate the mean and median for Weibull distributions, respectively.


Scale parameter computation

Description

returns the value of the scale parameter a given the survival (s) at time t

Usage

param_scale(s, t, shape = 1)

Arguments

s

survival rate at time t

t

time at which the survival distribution is evaluated

shape

shape parameter for the Weibull distribution

Value

Variance computation

Note

Weibull parametrization: S(x) = exp(- (x/a)^b)

Author(s)

Marta Bofill Roig


Restricted mean survival times Weibull distribution

Description

The function 'rmstw_f' computes the restricted mean survival times (RMST) according to the Weibull survival function.

Usage

rmstw_f(ascale, bshape, tau, low = 0)

Arguments

ascale

scale parameter for the Weibull distribution

bshape

shape parameter for the Weibull distribution

tau

RMST evaluated from low to tau

low

RMST evaluated from low to tau

Value

rmst

Author(s)

Marta Bofill Roig


Scale parameter computation

Description

returns the value of the scale parameter in the intervention group using Taylor series

Usage

scale1_taylorf(ascale0, Delta, tau)

Arguments

ascale0

scale parameter for the weibull distribution in the control group

Delta

RMST difference between groups

tau

end of follow-up

Value

Variance computation

Note

Weibull parametrization: S(x) = exp(- (x/a)^b)

Author(s)

Marta Bofill Roig


Effect size calculation for mixture survival distributions

Description

The function 'survm_effectsize' calculates the effect size in terms of the difference of restricted mean survival times (RMST) according to the information on responders and non-responders.

Usage

survm_effectsize(
  ascale0_r,
  ascale0_nr,
  delta_p,
  p0,
  bshape0 = 1,
  bshape1 = 1,
  ascale1_r,
  ascale1_nr,
  tau,
  Delta_r = NULL,
  Delta_0 = NULL,
  Delta_nr = NULL,
  anticipated_effects = FALSE
)

Arguments

ascale0_r

scale parameter for the Weibull distribution in the control group for responders

ascale0_nr

scale parameter for the Weibull distribution in the control group for non-responders

delta_p

effect size for the response rate

p0

event rate for the response

bshape0

shape parameter for the Weibull distribution in the control group

bshape1

shape parameter for the Weibull distribution in the intervention group

ascale1_r

scale parameter for the Weibull distribution in the intervention group for responders

ascale1_nr

scale parameter for the Weibull distribution in the intervention group for non-responders

tau

follow-up

Delta_r

RMST difference between intervention and control groups for responders

Delta_0

RMST difference between responders and non-responders in the control group

Delta_nr

RMST difference between intervention and control groups for non-responders

anticipated_effects

Logical parameter. If it is TRUE then the effect size is computed based on previous information on the effect sizes on response rate and survival-by-responses (that is, based on Delta_r, Delta_0, Delta_nr); otherwise is based on the distributional parameters (ascale0_r, ascale0_nr, ascale1_r, ascale1_nr, bshape0, bshape1).

Value

This function returns the overall mean survival improvement (RMST difference between groups) and it also includes the mean survival improvement that would be assumed for each responders and non-responders.

Author(s)

Marta Bofill Roig.

References

Design of phase III trials with long-term survival outcomes based on short-term binary results. Marta Bofill Roig, Yu Shen, Guadalupe Gomez Melis. arXiv:2008.12887

Examples

survm_effectsize(ascale0_r=8,ascale0_nr=5.6,ascale1_r=36,ascale1_nr=5.6,delta_p=0.2,p0=0.2,tau=5)

Sample size calculation for mixture survival distributions

Description

The function 'survm_samplesize' calculates the sample size according to the distributional parameters of the responders and non-responders.

Usage

survm_samplesize(
  ascale0_r,
  ascale0_nr,
  ascale1_r,
  ascale1_nr,
  delta_p,
  p0,
  m0_r,
  m0_nr,
  diffm_r,
  diffm_nr,
  S0_r,
  S0_nr,
  diffS_r,
  diffS_nr,
  Delta_r,
  Delta_nr,
  ascale_cens,
  tau,
  bshape0 = 1,
  bshape1 = 1,
  all_ratio = 0.5,
  alpha = 0.025,
  beta = 0.2,
  set_param = 0
)

Arguments

ascale0_r

scale parameter for the Weibull distribution in the control group for responders

ascale0_nr

scale parameter for the Weibull distribution in the control group for non-responders

ascale1_r

scale parameter for the Weibull distribution in the intervention group for responders

ascale1_nr

scale parameter for the Weibull distribution in the intervention group for non-responders

delta_p

effect size for the response rate

p0

event rate for the response

m0_r

survival mean for responders in the control group

m0_nr

survival mean for non-responders in the control group

diffm_r

difference in survival means between groups for responders

diffm_nr

difference in survival means between groups for responders

S0_r

tau-year survival rates for responders in the control group

S0_nr

tau-year survival rates for non-responders in the control group

diffS_r

difference in tau-year survival rates for responders

diffS_nr

difference in tau-year survival rates for non-responders

Delta_r

restricted mean survival times (RMST) difference between intervention and control groups for responders

Delta_nr

RMST difference between intervention and control groups for non-responders

ascale_cens

distributional parameter for the exponential distribution for the censoring

tau

follow-up

bshape0

shape parameter for the Weibull distribution in the control group

bshape1

shape parameter for the Weibull distribution in the intervention group

all_ratio

allocation ratio. The ratio of numbers of participants allocated in the control group. By default is assumed 1:1 (i.e., all_ratio=0.5)

alpha

type I error

beta

type II error

set_param

Set of parameters to be used for the responders/non-responders survival functions If the set of parameters is =1, then the sample size is computed using the survival means (m0_r,m0_nr,diffm _r,diffm_nr); if set_param=2, it is computed using the tau-year survival rates (S0_r,S0_nr,diffS_r,diffS_nr); if set_param=2, it is computed using the RMSTs and survival rates (Delta_r,Delta_nr,S0_r,S0_nr). If set_param=0, the computation is based on the distributional parameters (ascale0_r, ascale0_nr, ascale1_r, ascale1_nr).

Value

This function returns the total sample size needed and the expected effect size for overall survival (RMST difference between groups).

Author(s)

Marta Bofill Roig.

References

Design of phase III trials with long-term survival outcomes based on short-term binary results. Marta Bofill Roig, Yu Shen, Guadalupe Gomez Melis. arXiv:2008.12887


Mixture survival function

Description

The function 'survmixture_f' computes the survival distribution as a mixture of responders and non-responders. The responders and non-responders distributions are assumed to be Weibull distributions.

Usage

survmixture_f(t, ascale_r, ascale_nr, bshape = 1, p)

Arguments

t

time at which the survival distribution is evaluated

ascale_r

scale parameter for the Weibull distribution for responders

ascale_nr

scale parameter for the Weibull distribution for non-responders

bshape

shape parameter for the Weibull distribution

p

event rate for the response

Value

This function returns the survival function evaluated at t based on a mixture model of responders and non-responders.

Author(s)

Marta Bofill Roig.

References

Design of phase III trials with long-term survival outcomes based on short-term binary results. Marta Bofill Roig, Yu Shen, Guadalupe Gomez Melis. arXiv:2008.12887

Examples

survmixture_f(t=0.2,ascale_r=8,ascale_nr=5.6,p=0.2)

Derivative Weibull survival function

Description

The function 'survw_derivf' computes the derivative of the survival distribution 'survw_f'.

Usage

survw_derivf(t, ascale, bshape = 1)

Arguments

t

time

ascale

scale parameter for the Weibull distribution

bshape

shape parameter for the Weibull distribution

Value

derivative

Author(s)

Marta Bofill Roig


Weibull survival function

Description

The function 'survw_f' computes the Weibull survival function.

Usage

survw_f(t, ascale, bshape)

Arguments

t

time

ascale

scale parameter for the Weibull distribution

bshape

shape parameter for the Weibull distribution

Value

survival function

Author(s)

Marta Bofill Roig


Integrate function

Description

the function 'survw_integratef' is used for the integrations

Usage

survw_integratef(t, tau, ascale, bshape)

Arguments

t

time

tau

follow-up

ascale

scale parameter for the Weibull distribution

bshape

shape parameter for the Weibull distribution

Value

Variance computation

Author(s)

Marta Bofill Roig


Variance computation

Description

The function 'var_f' computes the variance.

Usage

var_f(ascale_r, ascale_nr, tau, bshape, ascale_cens, p)

Arguments

ascale_r

scale parameter for the Weibull distribution for responders

ascale_nr

scale parameter for the Weibull distribution for non-responders

tau

follow-up

bshape

shape parameter for the Weibull distribution

ascale_cens

distributional parameter for the exponential distribution for the censoring

p

event rate for the response

Value

Variance computation

Author(s)

Marta Bofill Roig