Description Usage Arguments Value Author(s) References See Also Examples
Power calculation of Mantel's permutation test.
1 | mantelPower(obj, effect.size = seq(0, 1, length.out = 50), alpha = 0.05)
|
obj |
an object of class "mantelTest". See |
effect.size |
numeric; the effect size specifying the alternative hypothesis. |
alpha |
numeric; the significance level at which to compute the power level. |
A data frame containing the effect size and its respective power level.
Anderson Rodrigo da Silva <anderson.agro@hotmail.com>
Silva, A.R.; Dias, C.T.S.; Cecon, P.R.; Rego, E.R. (2015). An alternative procedure for performing a power analysis of Mantel's test. Journal of Applied Statistics, 42(9): 1984-1992.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Mantel test
data(garlicdist)
garlic <- tocher(garlicdist)
coph <- cophenetic(garlic)
mt1 <- mantelTest(garlicdist, coph, xlim = c(-1, 1))
# Power calculation, H1: rho = 0.3
mantelPower(mt1, effect.size = 0.3)
# Power calculation, multiple H1s and different alphas
p01 <- mantelPower(mt1, alpha = 0.01)
p05 <- mantelPower(mt1, alpha = 0.05)
p10 <- mantelPower(mt1, alpha = 0.10)
plot(p01, type = "l", col = 4)
lines(p05, lty = 2, col = 4)
lines(p10, lty = 3, col = 4)
legend("bottomright", c("0.10", "0.05", "0.01"),
title = expression(alpha), col = 4, lty = 3:1, cex = 0.8)
# End (Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.