QIMR Genetic Epidemiology Laboratory Home > Dale's Homepage > matSpD

Matrix Spectral Decomposition (matSpD) - estimate the equivalent number of independent variables in a correlation (r) matrix.

I have now limited matSpD to correlation matrices containing between 2 and 200 rows!

Given the sign of the correlation is not important with regard to multiple test correction, matSpD now automatically analyses the absolute values of your correlation matrix.

If you have larger matrices use matSpDlite, which ONLY calculates Veff and VeffLi (i.e., does not perform time-consuming varimax/promax rotations) thus allowing users to obtain Veff/VeffLi values for large numbers (1000s) of variables.

Below I provide a downloadable R script to perform matSpD analysis on your local machine.

Analogous to my SNPSpD approach, matSpD provides a measure of the equivalent number of independent variables in a correlation (r) matrix, by examining the ratio of observed eigenvalue variance (after spectral decomposiiton) to its theoretical maximum. Please refer to the SNPSpD webpage for further information.

It is worth noting that although the SNPSpD approach utilises an LD correlation measure which is not technically appropriate for SNPs, which are multinomial (categorical/ordinal) variables, I've found the results comparable to using Spearman's rho. Indeed, it is generally accepted that use of Pearson's correlation (r) [appropriate for interval/numerical data] on categorical/ordinal data, rarely affects substantive research conclusions. Nonetheless, one may wish to upload their preferred matrix of correlations using this interface.

The matSpD interface takes one file as input [please use short simple file names (i.e., no spaces or special characters)]:
1) a space or tab delimited [PC/UNIX (not Mac)] plain text (ascii/ansi) format text file (with no hidden characters) containing your correlation (r) matrix ("corr.matrix") without row and column names.

The following links provide an example of such an input file and its corresponding output:
corr.matrix - input file,
results - output file.

To run matSpD:

Please specify where your "corr.matrix" file is located [NB: your matrix file may be zipped (*.zip) or gzipped (*.gz)]:

Please be patient, the spectral decomposition may take a while (depending on the size of your correlation matrix).


Cheverud JM (2001) A simple correction for multiple comparisons in interval mapping genome scans. Heredity 87:52-8

Li J, Ji L (2005) Adjusting multiple testing in multilocus analyses using the eigenvalues of a correlation matrix. Heredity 95:221-227

Nyholt DR (2004) A simple correction for multiple testing for SNPs in linkage disequilibrium with each other. Am J Hum Genet 74(4):765-769.

R Development Core Team (2003) R: a language and environment for statistical computing. R Foundation for  Statistical Computing, Vienna, http://www.R-project.org (accessed March 1, 2004)

Download an R script matSpD.R to perform matSpD analysis on your local machine.

Page last updated September 18, 2015.

Special thanks to David Smyth (Genepi's IT guru) for assisting with the development of this web interface.

Tel: +61-7-3362 0258 Find Us
The Genetic Epidemiology Laboratory
Email: daleN@qimr.edu.au Contact Us
The Queensland Institute of Medical Research