Description Usage Arguments Value Author(s) References See Also Examples
View source: R/T1EpSceptical.R
The type-I error rate of the sceptical p-value is computed for a specified level of replication success, the relative variance, and the alternative hypothesis.
1 | T1EpSceptical(level, c, alternative = "one.sided")
|
level |
A vector of levels of replication success |
c |
A 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. |
alternative |
Either |
The type-I error rate
Samuel Pawel
Held, L. (2020). The harmonic mean chi-squared test to substantiate scientific findings. Journal of the Royal Statistical Society: Series C (Applied Statistics), 69, 697-708. https://doi.org/10.1111/rssc.12410
Held, L., Micheloud, C. & Pawel, S. (2020). The assessment of replication success based on relative effect size. https://arxiv.org/abs/2009.07782
pSceptical
, levelSceptical
, PPpSceptical
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## compare type-I error rate for different levels of replication success
levels <- c("nominal" = levelSceptical(level = 0.025, type = "nominal"),
"liberal" = levelSceptical(level = 0.025, type = "liberal"),
"controlled" = levelSceptical(level = 0.025, type = "controlled"),
"golden" = levelSceptical(level = 0.025, type = "golden"))
c <- seq(0.2, 5, by = 0.05)
t1 <- sapply(X = levels, FUN = function(l) {
T1EpSceptical(level = l, c = c, alternative = "one.sided")
})
matplot(x = c, y = t1*100, type = "l", lty = 1, lwd = 2, las = 1, log = "x",
xlab = bquote(italic(c)), ylab = "Type-I error (%)", xlim = c(0.2, 5))
legend("topright", legend = names(levels), lty = 1, lwd = 2, col = seq_along(levels))
## check that one.sided controlled level controls type-I error rate for c = 1
## at alpha = 0.05*0.025 = 0.00125
T1EpSceptical(level = levelSceptical(level = 0.025, alternative = "one.sided",
type = "controlled"),
c = 1, alternative = "one.sided")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.