
bicorAndPvalue(x, y = NULL,
use = "pairwise.complete.obs",
alternative = c("two.sided", "less", "greater"),
...)
NULL
, the correlation of columns of x
will be calculated.bicor
for details."two.sided"
, "greater"
or "less"
.
the initial letter. "greater"
corresponds to positive
association, "less"
bicor
.cor.test
, but can work with matrices as input.bicor
for calculation of correlations only;cor.test
for another function for significance test of correlations
# generate random data with non-zero correlation
set.seed(1);
a = rnorm(100);
b = rnorm(100) + a;
x = cbind(a, b);
# Call the function and display all results
bicorAndPvalue(x)
# Set some components to NA
x[c(1:4), 1] = NA
corAndPvalue(x)
# Note that changed number of observations.
Run the code above in your browser using DataLab