bcor.test | R Documentation |
Bayesian Test for Association/Correlation Between Paired Samples This mimics cor.test
bcor.test(
x,
y,
z = NULL,
alternative = c("two.sided", "less", "greater"),
method = c("pearson", "kendall", "spearman"),
ciValue = 0.95,
use = "pairwise.complete.obs",
h0 = 0,
kappa = 1,
hyperGeoOverFlowThreshold = 25,
oneThreshold = 0.001,
var = 1
)
x, y |
numeric vectors of data values. x and y must have the same length |
z |
data frame of data values of the controlling variables. |
alternative |
indicates the alternative hypothesis and must be one of "two.sided", "greater" or "less". "greater" corresponds to positive association, "less" to negative association. |
method |
a character string indicating which correlation coefficient is to b used for the test. One of "pearson", "kendall" or "spearman". |
ciValue |
numeric in (0, 1) credible level for the returned credible interval. |
h0 |
numeric between -1 and 1 that specifies the point null hypothesis |
kappa |
numeric > 0 that specifies the |
hyperGeoOverFlowThreshold |
numeric > 0 such that if log(bf10) > hyperGeoOverFlowThreshold then the Savage-Dickey adaptation is used for to compute the one-sided Bayes factors, instead of the analytical ones. |
oneThreshold |
numeric > 0 such that if abs(1 - stat) < oneThreshold, then abs(stat) is viewed as one. |
var |
numeric > 0 that specifies the asymptotic variance of the approximate likelihood for Kendall's tau |
A list with class "btest" containing the following components:
x <- rnorm(100)
y <- rnorm(100)
bcor.test(x, y)
bcor.test(x, y, method="kendall")
z <- data.frame(rnorm(100))
bcor.test(x, y, z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.