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

wmst_powR Documentation

Sample Size and Power for the Test of the Difference in Window Mean Survival Time

Description

Determine the asymptotic power of the test of WMST under a given trial design, or calculate the samples size needed to achieve a desired power.

Usage

wmst_pow(survC, survT, censor = NA, eperiod, end_study, tau0, tau1, n = NA, power = NA, plot = FALSE, sim = F, M = 1000, method = "tau_star", alpha = 0.05, two.sided = FALSE)

Arguments

survC

the survival distribution of the control group, as a list in the form output by wmst_surv.

survT

the survival distribution of the treatment group, as a list in the form output by wmst_surv.

censor

The common CDF of the censoring distribution for treatment and control arms.

eperiod

The duration of the enrollment period if subjects are assumed to accrue uniformly over the enrollment interval ⁠(0,eperiod)⁠.

end_study

The total duration of the study/follow-up period.

tau0

A scaler vector to specify the lower truncation time points of the window for the WMST calculation. tau0 needs to be at least 0 and smaller than tau1. When tau0 = NULL, the default value 0 is used (i.e., the lower bound for restricted mean survival analysis).

tau1

A scaler value to specify the upper truncation time point of the window for the WMST calculation. tau1 needs to be smaller than the minimum of the largest observed time in each of the two groups. When tau1 = NULL, the default value (i.e., the minimum of the largest observed time in each of the two groups) is used.

n0

The total sample size in control group.

n1

The total sample size in treatment group.

power

The desired power of the test.

alpha

The type I error level. Default is 0.05.

two.sided

Determines whether the test is upper-tailed (two.sided = FALSE) or two-sided. The default is FALSE.

Details

For more details, please see the package vignette: browseVignettes(package = "survWMST")

Value

an object of class pow.

n

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

powerWMST

the user-specified power, or if power was left blank, the asymptotic power of the RMST test. If two.sided=FALSE, powerWMST gives the power of rejecting in favor of the treatment arm. If two.sided=TRUE, powerWMST gives the power of rejecting the null in favor of a two-sided alternative.

Author(s)

Mitchell Paukner

References

Note to self: figure out what to place here!


pauknemj/survWM2 documentation built on March 21, 2023, 5:29 a.m.