Description Usage Arguments Details Value Author(s) See Also Examples
This function is intended to calculate robust correlation values between pairs of rows of numerical matrix or between two numerical vectors.
1 | robustCorr(x, y=NULL)
|
x |
numerical matrix or vector. If a matrix the method calculates
the robust correlations between all pairs of rows. If |
y |
optional numeric vector, must be specified if |
This function calculates a robust correlation value in a procedure
similar to the leave-one-out used for cross-validation of
classification results. The algorithm removes one point at a time and
calculates a usual Pearson correlation value. Them, with a vector
r
of correlation values that has the same length as the
columns of x
(or vectors x
and y
), the algorithm
decides by the min
(r) or max
(r), according
with that one that is more distant from the median value.
If x
is a matrix, the method return a list with two square
matrices, the first one containing the robust correlation values
between all pairs of rows from x
and the second containing the
index of the point removed from calculation. If x
is a vector,
y
must be specified and the function return a list with the
robust correlation value between them and the index of the point removed.
Gustavo H. Esteves <gesteves@vision.ime.usp.br>
cor
from package stats.
1 2 3 4 5 6 | x <- runif(50, 0, 1)
y <- rbeta(50, 1, 2)
robustCorr(x, y)
z <- matrix(rnorm(100, 0, 1), 4, 25)
robustCorr(z)
|
Loading required package: convert
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, basename, cbind, colnames,
dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which.max, which.min
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: limma
Attaching package: ‘limma’
The following object is masked from ‘package:BiocGenerics’:
plotMA
Loading required package: marray
Loading required package: graph
$Rcor
[1] 0.1133295
$idx
[1] 25
$Rcor
[,1] [,2] [,3] [,4]
[1,] 1.00000000 0.10650746 -0.09407205 0.22639472
[2,] 0.10650746 1.00000000 0.12148067 -0.04311688
[3,] -0.09407205 0.12148067 1.00000000 0.26829051
[4,] 0.22639472 -0.04311688 0.26829051 1.00000000
$idx
[,1] [,2] [,3] [,4]
[1,] 0 17 11 11
[2,] 17 0 6 17
[3,] 11 6 0 21
[4,] 11 17 21 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.