RMSTpowadjusted: Sample Size and Power for the Test of the Difference in...

View source: R/RMSTpowadjusted.R

RMSTpowadjustedR Documentation

Sample Size and Power for the Test of the Difference in Restricted Mean Survival Time Under Biomarker Misclassification

Description

Determine the asymptotic power of the test of RMST under a given trial design when using estimators that are adjusted for biomarker misclassification (i.e., the sensitivity and/or specificity of the biomarker test is less than 1), or calculate the samples size needed to achieve a desired power in this setting.

Usage

RMSTpowadjusted(
  survdef_t0_m0,
  survdef_t1_m0,
  survdef_t0_m1,
  survdef_t1_m1,
  k1,
  k2,
  tau,
  prev,
  sens,
  spec,
  n = NA,
  power = NA,
  alpha = NA,
  two.sided = F,
  test = "T in M+"
)

Arguments

survdef_t0_m0

the survival distribution of the control, marker negative group, as a list in the form output by survdef.

survdef_t1_m0

the survival distribution of the treatment, marker negative group, as a list in the form output by survdef.

survdef_t0_m1

the survival distribution of the control, marker positive group, as a list in the form output by survdef.

survdef_t1_m1

the survival distribution of the treatment, marker positive group, as a list in the form output by survdef.

k1

length of the accrual period. We assume subjects will accrue uniformly over the interval ⁠(0, k1)⁠ and then be followed until trial time k1+k2.

k2

length of the follow-up period.

tau

restriction time for the RMST.

prev

the prevalence of the biomarker.

sens

the sensitivity of the biomarker test.

spec

the specificity of the biomarker test.

n

total sample size for the clinical trial. Either n or power can be specified, and the other value will be calculated. 1:1 randomization is assumed as well as enrollment of equal numbers of patients who test positive for the biomarker and patients who test negative for the biomarker, i.e., n/4 patients who test positive will be randomized to the treatment group, n/4 patients who test negative for the biomarker will be randomized to the control group, etc.

power

the desired power.

alpha

type I error level. Default is 0.025 if 'two.sided'=F and 0.05 if 'two.sided'=T.

two.sided

whether a two-sided test is desired. Default is F. If test = 'T in M+' or 'T in M-', this corresponds to a test of treatment over control; if test = 'M in T+' or 'M in T-', it corresponds to a test of marker positive over marker negative; if test = 'interaction' it corresponds to a test to show a larger treatment effect in the marker positive group. If two.sided = T, the power for each one-sided test will be reported separately in the results; the power of a two-sided test is the sum of two.

test

the test for which you want to power the clinical trial This can be set to 'T in M+' (treatment effect in marker positive group), 'T in M-' (treatment effect in marker negative group), 'M in T+' (marker effect in treatment group), 'M in T-' (marker effect in control group) or 'interaction'.

Value

a list with components

n

the user-specified n, or if n was left blank, the n needed to achieve the user-specified power.

powerRMST

the user-specified power, or if power was left blank, the asymptotic power of the RMST test. If one-sided=T, powerRMST is equivalent to powerRMST1over0. If one-sided=F, powerRMST is equivalent to the sum of the power of a one-sided test in each direction, i.e. powerRMST1over0 + powerRMST0over1.

powerRMST1over0

the asymptotic power for a test of treatment over control or marker positive over marker negative or a larger treatment effect in the marker positive group. See the explanations of the test and two.sided parameters.

powerRMST0over1

the asymptotic power for a test of control over treatment or marker negative over marker positive or a larger treatment effect in the marker negative group. See the explanations of the test and two.sided parameters. If a one-sided test is specified, this is set to NA.

pKME

the probability that you will be able to estimate RMST difference at time tau in the 4 groups (treatment/control and test positive/negative) using the standard Kaplan-Meier estimator. If the last observation in any group is censored, and the censoring time is less than tau, the Kaplan-Meier estimate is not defined through time tau, and the RMST difference cannot be estimated using the standard area under the Kaplan-Meier curve. A modified estimator must be used.

Examples

surv_t0_m0 <- survdefWeibull(shape = .8, scale = 10)
surv_t1_m0 <- survdefWeibull(shape = .8, scale = exp(-.5)^(-1/.8)*10)
surv_t0_m1 <- survdefWeibull(shape = .8, scale = exp(.1)^(-1/.8)*10)
surv_t1_m1 <- survdefWeibull(shape = .8, scale = exp(-.5+.1+.3)^(-1/.8)*10)
RMSTpowadjusted(surv_t0_m0, surv_t1_m0, surv_t0_m1,surv_t1_m1,
                 k1=20, k2=5, tau = 10, prev=.3, sens=.8, spec=.8,
                 n=400, power=NA, alpha = .05, two.sided=T, test = 'T in M+')

anneae/RMSTdesign documentation built on Nov. 7, 2023, 1:59 a.m.