Description Usage Arguments Details Value References See Also Examples
Plots power (on the y-axis) to detect a correlate of risk effect size (on the x-axis) in the active treatment group for a dichotomous or trichotomous biomarker. The correlate of risk effect size is quantified as the relative risk of the clinical endpoint comparing subgroups of active treatment recipients with high and low biomarker response.
1 2 3 4 5 6 7 8 9 |
outComputePower |
either a list of lists containing output from |
outDir |
a character vector specifying path(s) to output |
legendText |
a character vector specifying the entirety of the legend text. The order of the elements (i.e., parameter values) must match that of the |
legendTitle |
a character vector specifying the legend title if applicable ( |
extendedLeg |
a logical value specifying if the extended footnote legend with additional information about the control-to-case ratio, overall vaccine efficacy, number of cases, etc., is to be included. Default is |
verboseLeg |
a logical value specifying if the extended footnote legend shall use English words ( |
margin |
a numeric vector of the form |
If multiple levels are specified for the biomarker measurement error input parameters (i.e., for sens
/spec
or rho
) in computePower
, only the first level is used to determine
the RR_t values shown as x-axis tickmark labels.
None. The function is called solely for plot generation.
Gilbert P. B., Janes H., and Huang Y. (2016), Power/Sample Size Calculations for Assessing Correlates of Risk in Clinical Efficacy Trials. Stat Med 35(21):3745-59.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | # Example scenario with trichotomous biomarker, where values of controlCaseRatio are varied
# Set input parameters for computePower function
nCasesTx <- 10
nControlsTx <- 300
nCasesTxWithS <- 10
controlCaseRatio <- c(5,3)
VEoverall <- 0.75
risk0 <- 0.034
VElat0 <- seq(0, VEoverall, len=5)
VElat1 <- rep(VEoverall, 5)
Plat0 <- P0 <- 0.2
Plat2 <- P2 <- 0.6
sens <- spec <- 0.8
FP0 <- FN2 <- 0
M <- 50
alpha <- 0.05
biomType <- "trichotomous"
# Output from computePower function is stored in an object as a list of lists
pwr <- computePower(nCasesTx=nCasesTx, nControlsTx=nControlsTx, nCasesTxWithS=nCasesTxWithS,
controlCaseRatio=controlCaseRatio, risk0=risk0,
VEoverall=VEoverall, Plat0=Plat0, Plat2=Plat2, P0=P0, P2=P2,
VElat0=VElat0, VElat1=VElat1, M=M, alpha=alpha, spec=spec,
FP0=FP0, sens=sens, FN2=FN2, biomType=biomType)
# Set parameters for plotPowerTri function
# outComputePower is a list of lists containing outputs from the computePower function
outComputePower <- pwr
legendText <- paste0("controls:cases = ", c("5:1","3:1"))
plotPowerTri(outComputePower=outComputePower, legendText=legendText)
## Not run:
# outComputePower is a character vector specifying the files containing computePower output
# outDir is a character vector specifying the outComputePower file directories
outComputePower <- paste0("myFile_controlCaseRatio_", c(5, 3), ".RData")
outDir <- rep("~/myDir", 2)
legendText <- paste0("controls:cases = ", c("5:1","3:1"))
plotPowerTri(outComputePower, outDir=outDir, legendText = legendText)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.