SMATR: Standardised Major Axis Tests & Routines

Support

There is limited support available for SMATR. Users are referred first to Warton et al 2006 for background on the techniques, and to the user's guide for information on how to use the program. If you cannot find the answer to your question here, consult the links below. If you cannot find an answer here, or think you have found a bug, please contact me at dfalster [ at] bio.mq.edu.au.

Version History

Version 2.0 released Nov 13 2006
Changes compared to version 1.0

Differences to R version:

Bugs fixed
Nov 21 2006 - can't enter negative or zero slopes or intercepts for comparisons against hypothesised values.

Trouble loading data or program crashes

1. The data won’t load after I press L in menu 1
The problem is the program cannot locate the data file (input.txt) and so is not progressing to the next menu. Check that: 1. The program file (smatr.exe) is in the same folder as the data file 2. Make sure the file has the default name (input.txt) OR that you enter a new name at the first menu (option i)

2. The program crashes after I press L in the second menu
There is some problem with the format of the data file. Make sure your file is a tab-delimited text file. In particular, check 1. that all columns in all rows are present. Sometimes Excel omits the cell altogether if you have a blank cell in the far-right-column. To resolve this problem make a new variable or rearrange variables such that the right-hand column is complete. 2. Check that black cells are entirely empty, or indicated a single space only. 3. Check numbers are NOT saved used scientific notation (e.g. 3.2EXP-2). 4. Remove any excess lines at the end of the file

3. Trouble on MAC or linux
SMATR has been compiled for mac and runs smoothly. However you may encounter three problems:
a. Running the program: To run SMATR on a mac you can either open a terminal window and run the program from the command line, or double click on the program. With the latter you may have trouble opening your data file. This is because the double clicking sets the users home directory as the default path. Therefore you need to: (a) move you data files to your home directory (e.g. /Users/dfalster/), or (b) enter the relative path name as input filename (e.g. /project/data/input.txt), or (c) open a terminal window and run the program by typing ./smatr.
b. Loading data files: You may also encounter a problem loading a data file since Macs and PCs use different formats for new line characters. The distributed version uses the PC default. You can convert a text file from mac to PC format by typing tr '\r' '\r\n' <mac.txt> dos.txt at the command line in terminal window. A version with mac default is also being prepared.
c. Confidence intervals for large n: For large sample sizes (n>250) , the GSL library returns an error when calculating confidence intervals. If this concerns you, please send me an email. I am doing my best to resolve this ASAP.

Conceptual Issues

1. Why don’t the confidence intervals overlap zero? An SMA slope is calculated as the ratio of the standard deviation in Y to standard deviation in X. Logically this can never be zero and the default slope for random data (no relationship between X & Y) with similar variance in X and Y is 1. The slope differs from 1 when the data is stretched more along one axis than the other. This means that you can record slopes significantly different to 0, even when the data aren't significantly correlated (not the case for OLS). 

2.There’s only a weak relationship in my data, why are the confidence intervals about the predicted slope so tight? An SMA reflects the nature of a relationship between two variables, while an r2 reflects the strength of the relationship. These are two independent properties characterising the relationship between two variables. Narrow confidence intervals are possible, even when r 2 is low, with sufficient sampling effort (i.e. large n). With a large sample size you have increased certainty about both the strength of the relationship (r2 - even if it's low you are sure about it) and the nature of the relationship (i.e. slope, intercept).

3. Why do I get different confidence intervals in other programs?
SMATR calculates confidence intervals by inversion. Many other programs use an approximation by taking the confidence envelope for ordinary linear regression and applying it to the SMA slope. This will usually lead to wider intervals.

4. If I have two groups with slopes of different direction, why doesn't the common slope lie between them?
The MA/SMA common slope tests do not distinguish between major and minor axes. In the case of SMA, -b and b are treated as the same thing (hence the sign of the slope is ignored), and in the case of MA, -1/b and b (perpendicular to each other) are treated as the same thing. An SMA slope is calculated by taking the ratio of sum of squares and multiplying by the sign (ie. +/-) of the XY covariance (details given in appendix). In estimating a common slope, the test doesn't distinguish between positive and negative slopes because all "sums of squares" are positive. Thus it is assumed all slopes are of similar sign (ie. all positive, all negative). So your estimated common slopes DO lie between the two slopes, but between the absolute values rather than the actual values of the positive and negative slope. But, if you have groups with slopes of different sign they are so clearly heterogeneous that a statistical test is not necessary. Reporting a common slope is also meaningless where there is significant heterogeneity, so a good estimate is not required. Where the slopes are more similar, the program allows you to test statistically for this.

5. Why do I get the same results when comparing my data to slope of b and –b?
The one (and multi) sample slope tests do not distinguish between positive and negative slope values. In general this quirky property shouldn't lead to many problems since your intuition should tell you that a positive slope is obviously different to a hypothesised negative slope and a statistical test is unnecessary (or that several groups with slope of opposite sign clearly don't have a common slope).

6. How can I plot confidence intervals for the SMA/MA line?
We currently do not have a good method for this. One approach would be to construct a joint confidence region for all elevation and slope possibilities. A second possibility to calculate an equal frequency ellipse for the cloud of data. This is the ellipse which includes 95% of all points.

last updated 13/11/2006