sampleSizeReplicationSuccess {ReplicationSuccess}R Documentation

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

Description

The relative sample size for replication success is computed based on the test statistic of the original study, the power and the design prior.

Usage

sampleSizeReplicationSuccess(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

Replication success 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 replication success.

Value

The relative sample size for replication success. 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

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


[Package ReplicationSuccess version 0.1-1 Index]