bicorAndPvalue  R Documentation 
A faster, onestep calculation of Student correlation pvalues for multiple biweight midcorrelations, properly taking into account the actual number of observations.
bicorAndPvalue(x, y = NULL, use = "pairwise.complete.obs", alternative = c("two.sided", "less", "greater"), ...)
x 
a vector or a matrix 
y 
a vector or a matrix. If 
use 
determines handling of missing data. See 
alternative 
specifies the alternative hypothesis and must be (a unique abbreviation of) one of

... 
other arguments to the function 
The function calculates the biweight midcorrelations of a matrix or of two matrices
and the corresponding Student pvalues.
The output is not as fullfeatured as cor.test
, but can work with matrices as input.
A list with the following components, each a marix:
bicor 
the calculated correlations 
p 
the Student pvalues corresponding to the calculated correlations 
Z 
Fisher transform of the calculated correlations 
t 
Student t statistics of the calculated correlations 
nObs 
Numbers of observations for the correlation, pvalues etc. 
Peter Langfelder and Steve Horvath
Peter Langfelder, Steve Horvath (2012) Fast R Functions for Robust Correlations and Hierarchical Clustering. Journal of Statistical Software, 46(11), 117. https://www.jstatsoft.org/v46/i11/
bicor
for calculation of correlations only;
cor.test
for another function for significance test of correlations
# generate random data with nonzero 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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.