Description Usage Arguments Details Examples
Computes a (possibly weighted) dependence measure between x
and y
if
these are vectors. If x
and y
are matrices then the measure between the
columns of x
and the columns of y
are computed.
1 2 3 4 5 6 7 8  indep_test(
x,
y,
method = "pearson",
weights = NULL,
remove_missing = TRUE,
alternative = "twosided"
)

x, y 
numeric vectors of data values. 
method 
the dependence measure; see Details for possible values. 
weights 
an optional vector of weights for the observations. 
remove_missing 
if 
alternative 
indicates the alternative hypothesis and must be one of

Available methods:
"pearson"
: Pearson correlation
"spearman"
: Spearman's ρ
"kendall"
: Kendall's τ
"blomqvist"
: Blomqvist's β
"hoeffding"
: Hoeffding's D
Partial matching of method names is enabled.
All methods except "hoeffding"
work with discrete variables.
1 2 3 4 5 6  x < rnorm(100)
y < rpois(100, 1) # all but Hoeffding's D can handle ties
w < runif(100)
indep_test(x, y, method = "kendall") # unweighted
indep_test(x, y, method = "kendall", weights = w) # weighted

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.