designPrior {BayesRepDesign}  R Documentation 
Design prior for effect size
Description
Creates a design prior for the effect size which can then be used for power and sample size calculations of a replication study. The design prior is obtained from updating an initial prior for the effect size by the data from the original study. A normalnormal hierarchical model is assumed, see Pawel et al. (2022) for details.
Usage
designPrior(
to,
so,
mu = 0,
sp = Inf,
tau = 0,
g = sp^2/(tau^2 + so^2),
h = tau^2/so^2,
type = c(NA, "conditional", "predictive", "EB")
)
Arguments
to 
Effect estimate from original study 
so 
Standard error of effect estimate from original study 
mu 
The initial prior mean. Defaults to 
sp 
The initial prior standard deviation. Defaults to 
tau 
The initial prior heterogeneity standard deviation. Defaults to

g 
The relative initial prior variance 
h 
The relative initial prior heterogeneity variance 
type 
Shortcut for special parameter combinations. The available
options are 
Details
The "conditional"
design prior corresponds to a point mass at
the original effect estimate, i.e., assuming that the true effect size is
equal to the original effect estimate. The "predictive"
design
prior is obtained from updating a uniform initial prior by the likelihood
of the original data. The "EB"
design prior is obtained by
empirical Bayes estimation of the variance of the normal prior and
induces adaptive shrinkage that depends on the pvalue of the original
effect estimate.
Value
Returns an object of class "designPrior"
which is a list containing:
dpMean  The computed mean of the design prior 
dpVar  The computed variance of the design prior 
to  The specified original effect estimate 
so  The specified original standard error 
mu  The specified mean of the initial prior 
sp  The specified standard deviation of the initial prior 
tau  The specified heterogeneity variance 
Author(s)
Samuel Pawel
References
Pawel, S., Consonni, G., and Held, L. (2022). Bayesian approaches to designing replication studies. arXiv preprint. doi:10.48550/arXiv.2211.02552
See Also
Examples
designPrior(to = 1.1, so = 1)