plotPowerTri {CoRpower} | R Documentation |
Plotting of Power versus Correlate of Risk Effect Size for Dichotomous and Trichotomous Biomarkers
Description
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.
Usage
plotPowerTri(
outComputePower,
outDir = NULL,
legendText,
legendTitle = NULL,
extendedLeg = TRUE,
verboseLeg = TRUE,
margin = c(11, 7, 3, 1)
)
Arguments
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 |
Details
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.
Value
None. The function is called solely for plot generation.
References
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.
See Also
Examples
# 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)