skewers
A program for Cheverud's random skewers method of matrix comparison.
by Liam J. Revell

Contents


1.  Getting started

2.  Running skewers

3.  The output

4.  References and further reading

5.  Contact information

7.  Appendix - updates

Getting Started

Introduction

Skewers is a program for the calculation and hypothesis testing of the mean random skewers matrix correlation following Cheverud et al. (1983) and especially Cheverud (1996). Random skewers tests for significant similarity between two matrices - generally covariance matrices.

The random skewers method of Cheverud (1996) involves the calculation of the mean vector correlation of the response to random selection vectors applied to both matrices. In other words, for two matrices, A and B, and n random vectors, β1 through βn:

where

indicates that a vector correlation is calculated.

Hypothesis testing of the mean vector correlation is conducted by comparing it to the distribution of correlations between many pairs of random vectors.

Installation - Linux/UNIX

The source, this manual, all available executables, and an example data file are available as a zipped tarball skewers.tar.gz.

To install in Linux/UNIX, download the source skewers.c to your programs directory or other appropriate directory, e.g., /home/your_user_name/programs/skewers/skewers.c.
Before compiling skewers, first check the status of your gcc compiler:



You should see some variant of the above message. If not, you need to install a gcc compiler. See the following link for help.

To compile, type the following command:



If your terminal window looks like that after compiling skewers, you're probably in good shape.

Installation - Windows

Unfortunately, skewers is not a real Windows program. However it has been compiled for Windows and can be executed from the Command Prompt in Windows or by double-clicking on the executable.

Most Windows installations do not come packaged with a compiler, so I'm distributing the executable and hopefully that will work on your system (it should). The link to that executable is here. If you'd like to download a compiler to compile skewers from source in Windows, I recommend MinGW.

Back to top

Running skewers

Input file format

Input files should be created as plain text which can be accomplished in Linux by using a text editor such as gedit or in Windows by using WordPad and saving in Save as Type: Text Document Format. Many people will be using Microsoft excel for data compilation - in which you should save as 'tab delimited text.'

The input file format is as follows:

In this input file, the header contains two numbers - the number of matrices (three in this example) and the number of rows or columns in each matrix (five). The header is followed by each matrix in full, symmetrical form. For more than two matrices, all pairwise random skewers matrix correlations are reported.

NOTE ON FILE FORMAT- This program will probably be finicky about file format, so be careful to follow the format presented herein and the format of the example data file available with skewers.

Running skewers

Running skewers is easy. In Windows XP, you should be able to run the executable skewers.exe simply by double clicking on it. If you'd prefer, you can also run it from the command prompt. The easiest way to get a command prompt in XP is to open a RUN window and enter:



At the command prompt, navigate to the appropriate directory and type:


To run in Linux/UNIX navigate to the appropriate directory and type:


From here on out execution in Linux/UNIX and Windows are identical, so I will follow execution in Linux/UNIX.

The program will give you several prompts:



When prompted for input file, enter the name of the data file to be analyzed. Enter the name of a file for output. For few matrices (four or less) the results are also printed to screen. The program is quite fast, so selecting a very large number (105 or 106) is not unreasonable.

Back to top

The skewers output

The general output from skewers is printed to an output file and to the screen (for a number of matrices fewer than four) and looks as follows:


The upper matrix is a matrix of mean pairwise random skewers matrix correlations. Obviously, the diagonal should be composed of 1s. The lower matrix is a matrix of significances from the pairwise random skewers tests.

Back to top

References

1. Cheverud, J. M., J. J. Rutledge, and W. R. Atchley. 1983. Quantitative genetics of development: Genetic correlations among age-specific trait values and the evolution of ontogeny. Evolution 37:895-905.

2. Cheverud, J. M. 1996. Quantitative genetic analysis of cranial morphology in the cotton-top (Saguinus oedipus) and saddle-back S. fuscicollis) tamarins. J. Evol. Biol. 9:5-42.

Back to top

Contact information

Please contact me by email with any questions, or if you find the program useful. My email is lrevell@fas.harvard.edu, and my other contact information is listed below.

Although I have thoroughly tested the program, I encourage users to do the same and I would be happy to hear about any bugs you might find.

Liam J. Revell
Department of Organismic and Evolutionary Biology
Harvard University
Cambridge MA 02138
(314) 935-7256

Back to top

Appendix

Updates

DateUpdate
Sept. 10, 2006Error = vector-correlation calculated improperly. Result = fixed.
Apr. 3, 2007Error = random vectors drawn from incorrect distribution. Result = fixed. Comment - mostly inconsequential to results from large matrices.

Back to top


Content copyright. Last updated 3 Apr. 2007.