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 normal-normal 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 0 sp The initial prior standard deviation. Defaults to Inf (an improper uniform prior) tau The initial prior heterogeneity standard deviation. Defaults to 0 (no heterogeneity) g The relative initial prior variance g = sp^2/(tau^2 + so^2) (alternative parametrization of prior standard deviation sp) h The relative initial prior heterogeneity variance h = tau^2/so^2 (alternative parametrization of prior heterogeneity standard deviation tau) type Shortcut for special parameter combinations. The available options are NA, "conditional", "predictive", and "EB" (see details). Defaults to NA

### 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 p-value 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

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

pors, ssd
designPrior(to = 1.1, so = 1)