acetest | R Documentation |
Performs a permutation test of independence or association. The alternative hypothesis is that x and y are dependent.
Code authored by Bernhard Klar, Shawn Garbett.
acetest(x, y = NULL, nperm = 999, ...)
## S3 method for class 'acetest'
summary(object, ..., digits)
## S3 method for class 'acetest'
print(x, ...)
## S3 method for class 'acetest'
plot(
x,
acol = "blue",
xlim = c(min(x$tp), max(c(x$tp, ceiling(x$ace * 10)/10))),
col = "black",
breaks = 100,
main = "ACE Correlation Permutations",
xlab = bquote(rho(.(x$xname), .(x$yname))),
lwd = 2,
...
)
x |
a numeric vector, or a matrix or data frame with two columns. The
first column is the 'y' and the second column is the 'x' when
calling |
y |
a vector with same length as x. Default is NULL. |
nperm |
number of permutations. Default is 999. |
... |
additional arguments to pass to |
object |
S3 object of test results to dispatch. |
digits |
Number of significant digits to round for summary. |
acol |
for plot; color of the point estimate of correlation |
xlim |
for plot;xlimit of histogram |
col |
for plot;color of histogram bars |
breaks |
for plot;number of breaks. Default to 100. |
main |
for plot; main title of plot |
xlab |
for plot; x-axis label |
lwd |
for plot; line width of point estimate |
a list containing the following:
ace
The value of the test statistic.
pval
The *p*-value of the test.
Holzmann, H., Klar, B. 2025. "Lancaster correlation - a new dependence measure linked to maximum correlation". Scandinavian Journal of Statistics. 52(1):145-169 <doi:10.1111/sjos.12733>
cor
n <- 200
z <- matrix(rnorm(2*n), n) / sqrt(rchisq(n, 2)/2)
x <- z[,2]; y <- z[,1]
cor.test(x, y, method="spearman")
acetest(x, y)
plot(acetest(z))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.