powerSignificanceInterim {ReplicationSuccess} | R Documentation |
Interim power of a replication study
Description
Computes the power of a replication study taking into account data from an interim analysis.
Usage
powerSignificanceInterim(
zo,
zi,
c = 1,
f = 1/2,
level = 0.025,
designPrior = c("conditional", "informed predictive", "predictive"),
analysisPrior = c("flat", "original"),
alternative = c("one.sided", "two.sided"),
shrinkage = 0
)
Arguments
zo |
Numeric vector of z-values from original studies. |
zi |
Numeric vector of z-values from interim analyses of replication studies. |
c |
Numeric vector of variance ratios of the original and replication effect estimates. This is usually the ratio of the sample size of the replication study to the sample size of the original study. Default is 1. |
f |
Fraction of the replication study already completed. Default is 0.5. |
level |
Significance level. Default is 0.025. |
designPrior |
Either "conditional" (default), "informed predictive", or "predictive". "informed predictive" refers to an informative normal prior coming from the original study. "predictive" refers to a flat prior. |
analysisPrior |
Either "flat" (default) or "original". |
alternative |
Either "one.sided" (default) or "two.sided". Specifies if the significance level is one-sided or two-sided. |
shrinkage |
Numeric vector with values in [0,1). Defaults to 0.
Specifies the shrinkage of the original effect estimate towards zero, e.g.,
the effect is shrunken by a factor of 25% for |
Details
This is an extension of powerSignificance()
and adapts the ‘interim power’
from section 6.6.3 of Spiegelhalter et al. (2004) to the setting of replication studies.
powerSignificanceInterim
is the vectorized version of
.powerSignificanceInterim_
.
Vectorize
is used to vectorize the function.
Value
The probability of statistical significance in the specified direction at the end of the replication study given the data collected so far in the replication study.
Author(s)
Charlotte Micheloud
References
Spiegelhalter, D. J., Abrams, K. R., and Myles, J. P. (2004). Bayesian Approaches to Clinical Trials and Health-Care Evaluation, volume 13. John Wiley & Sons
Micheloud, C., Held, L. (2022). Power Calculations for Replication Studies. Statistical Science, 37, 369-379. doi:10.1214/21-STS828
See Also
sampleSizeSignificance
, powerSignificance
Examples
powerSignificanceInterim(zo = 2, zi = 2, c = 1, f = 1/2,
designPrior = "conditional",
analysisPrior = "flat")
powerSignificanceInterim(zo = 2, zi = 2, c = 1, f = 1/2,
designPrior = "informed predictive",
analysisPrior = "flat")
powerSignificanceInterim(zo = 2, zi = 2, c = 1, f = 1/2,
designPrior = "predictive",
analysisPrior = "flat")
powerSignificanceInterim(zo = 2, zi = -2, c = 1, f = 1/2,
designPrior = "conditional",
analysisPrior = "flat")
powerSignificanceInterim(zo = 2, zi = 2, c = 1, f = 1/2,
designPrior = "conditional",
analysisPrior = "flat",
shrinkage = 0.25)