sampleSizeSignificance {ReplicationSuccess}R Documentation

Computes the required relative sample size to achieve significance with a certain power

Description

The relative sample size to achieve significance is computed based on the test statistic of the original study, the power and the design prior.

Usage

sampleSizeSignificance(po=NULL, to=p2t(po, alternative=alternative),
power, level=0.05, designPrior="conditional", alternative="two.sided")

Arguments

po

A vector of P-values from original studies, default is NULL

to

A vector of test statistics from original studies. Is calculated from po, if necessary.

power

The power to achieve replication success.

level

Significance level.

designPrior

either "conditional" or "predictive". Defaults to "conditional".

alternative

either "one.sided" or "two.sided". Defaults to "two.sided". Specifies if the P-value is one-sided or two-sided. If the P-value is one-sided, then sample size calculations are based on a one-sided assessment of significance.

Value

The relative sample size to achieve significance. If larger that 1000 then Inf is returned.

Author(s)

Leonhard Held

References

Held, L. (2019). A new standard for the analysis and design of replication studies (with discussion). To appear in Journal of the Royal Statistical Society, Series A. https://arxiv.org/abs/1811.10287

Examples

sampleSizeSignificance(po=0.005, power=0.8)
sampleSizeSignificance(po=0.005, power=0.8, designPrior="predictive")
sampleSizeSignificance(po=0.005, power=0.8, alternative="one.sided")
sampleSizeSignificance(po=0.005, power=0.8, designPrior="predictive", alternative="one.sided")


[Package ReplicationSuccess version 0.1-1 Index]