View source: R/RMSTpowadjusted.R
RMSTpowadjusted | R Documentation |
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.
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+"
)
survdef_t0_m0 |
the survival distribution of the control, marker negative group, as a list in the form output by |
survdef_t1_m0 |
the survival distribution of the treatment, marker negative group, as a list in the form output by |
survdef_t0_m1 |
the survival distribution of the control, marker positive group, as a list in the form output by |
survdef_t1_m1 |
the survival distribution of the treatment, marker positive group, as a list in the form output by |
k1 |
length of the accrual period. We assume subjects will accrue
uniformly over the interval |
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 |
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'. |
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 |
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 |
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 |
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. |
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+')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.