sampleCorrelations: Calculates the correlation for random pairs of observations

Description Usage Arguments Value Author(s) References See Also Examples

Description

Calculates the correlation for random pairs of observations.

Usage

1
2
## S3 method for class 'matrix'
sampleCorrelations(X, MARGIN=1, pairs=NULL, npairs=max(5000, nrow(X)), ...)

Arguments

X

An NxK matrix where N >= 2 and K >= 2.

MARGIN

The dimension (1 or 2) in which the observations are. If MARGIN==1 (==2), each row (column) is an observation.

pairs

If a Lx2 matrix, the L index pairs for which the correlations are calculated. If NULL, pairs of observations are sampled.

npairs

The number of correlations to calculate.

...

Not used.

Value

Returns a double vector of length npairs.

Author(s)

Henrik Bengtsson

References

[1] A. Ploner, L. Miller, P. Hall, J. Bergh & Y. Pawitan. Correlation test to assess low-level processing of high-density oligonucleotide microarray data. BMC Bioinformatics, 2005, vol 6.

See Also

sample().

Examples

1
2
3
4
5
6
# Simulate 20000 genes with 10 observations each
X <- matrix(rnorm(n=20000), ncol=10)

# Calculate the correlation for 5000 random gene pairs
cor <- sampleCorrelations(X, npairs=5000)
print(summary(cor))

HenrikBengtsson/aroma.light-BioC_release documentation built on May 7, 2019, 1:55 a.m.