plotPowerCont {CoRpower}R Documentation

Plotting of Power Curve versus Correlate of Risk Effect Size for Continuous 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 continuous biomarker. The correlate of risk effect size is quantified as the odds ratio of the clinical endpoint comparing subgroups of active treatment recipients with a 1 standard deviation difference in a noise-free biomarker response.

Usage

plotPowerCont(
  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 computePower or a character vector specifying the .RData file(s) containing computePower output

outDir

a character vector specifying path(s) to output .RData file(s), necessary if
outComputePower is a character vector. Default is NULL.

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 computePower input parameters in order for legend labels to be accurate.

legendTitle

a character vector specifying the legend title if applicable (NULL by default)

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 TRUE.

verboseLeg

a logical value specifying if the extended footnote legend shall use English words (TRUE by default) or mathematical notation used in Gilbert, Janes, and Huang (2016)

margin

a numeric vector of the form c(bottom, left, top, right), which specifies the margins of the plot. Default is c(11, 7, 3, 1).

Details

If multiple levels are specified for the biomarker measurement error input argument rho, only the first level is used to determine the RR_c values shown as x-axis tickmark labels.

The function's plot can be interpreted in conjunction with the output of plotVElatCont by matching the CoR relative risk in the two plots and examining power compared to treatment (vaccine) efficacy. This sheds light on the importance of overall vaccine efficacy on power and allows correlates of risk results to be interpreted in terms of potential correlates of efficacy/protection.

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

computePower, plotVElatCont, plotPowerTri

Examples

# Example scenario with continuous biomarker, where values of rho are varied

# Set input parameters for computePower function
nCasesTx <- 10
nControlsTx <- 300
nCasesTxWithS <- 10
controlCaseRatio <- 5
VEoverall <- 0.75
risk0 <- 0.034
PlatVElowest <- 0.2
VElowest <- seq(0, VEoverall, len=5)
Plat0 <- P0 <- 0.2
Plat2 <- P2 <- 0.6
M <- 22
alpha <- 0.05
sigma2obs <- 1
rho <- c(1, 0.7, 0.4)
biomType <- "continuous"

# Output from computePower function is stored in an object as a list of lists
pwr <- computePower(nCasesTx=nCasesTx, nCasesTxWithS=nCasesTxWithS, nControlsTx=nControlsTx,
                    controlCaseRatio=controlCaseRatio, risk0=risk0, VEoverall=VEoverall,
                    PlatVElowest=PlatVElowest, VElowest=VElowest,
                    Plat0=Plat0, Plat2=Plat2, P0=P0, P2=P2, M=M, alpha=alpha,
                    sigma2obs=sigma2obs, rho=rho, biomType=biomType)

# Set parameters for plotPowerCont function
# outComputePower is a list of lists containing output from the computePower function
outComputePower <- pwr
legendText <- paste0("rho = ", c(1, 0.7, 0.4))
plotPowerCont(outComputePower=outComputePower, legendText=legendText)

## Not run: 
# Output from computePower function is saved in RData files
computePower(..., saveDir = "myDir", saveFile = "myFile.RData")
# outComputePower is a character string specifying the file containing the
# computePower output
# outDir is a character string specifying the outComputePower file directory
outComputePower <- paste0("myFile_rho_", c(1, 0.7, 0.4), ".RData")
outDir <- "~/myDir"
legendText <- paste0("rho = ", c(1, 0.7, 0.4))
plotPowerCont(outComputePower, outDir=outDir, legendText = legendText)

## End(Not run)


[Package CoRpower version 1.0.4 Index]