Evolutionary Biology & Ecologyebe-Welcome.html
ebe homeebe-Welcome.html


Developed by Olivier Hardy

A program to assess the association between spatially autocorrelated variables using a torus-translation test on multiple grids.


TOROCOR is designed (1) to characterise the spatial autocorrelation of quantitative and/or qualitative variables and (2) to test the significance of the association between variables, notably using torus-translation randomisations. The latter procedure removes the bias of classical tests applied on spatially autocorrelated variables where samples cannot be considered as independent (classical tests tend to be liberal, i.e. rejecting too often the null hypothesis that there is no association between variables).

The data required are geographically located sample points where a set of quantitative and/or qualitative variables are defined. In addition, to apply torus-translation tests, each sample must be positioned on one or several rectangular grids (otherwise only spatial autocorrelation analysis and association tests using potentially biased complete randomisation tests can be performed). Missing data are allowed but should occur at low frequency.

The spatial autocorrelation of variables is described using Moran’s I statistic for quantitative variables and an analogue of Moran's I for qualitative variables. To quantify the magnitude of the spatial autocorrelation by a single statistic, autocorrelation values between samples are regressed on the distance between samples, or its logarithm, providing regression slopes. Upon request, these regression slopes can be assessed for a restricted range of distances. Spatial autocorrelation is tested by performing complete randomisations, whereby the values of a variable are randomly shuffled among all sample points. Autocorrelation per distance intervals as well as the regression slopes are recomputed for many randomised data sets to assess their distributions under the null hypothesis that there is no spatial structure. P-vales are estimated by comparing the observed statistics with their respective distributions, and 95% envelopes are constructed. Tests based on torus-translations can also be performed upon request. This allows to control whether the spatial structure is affected by the torus-translation procedure to be used when testing the association between variables.

TOROCOR characterises the association between variables (1) by Pearson’s correlation coefficient for two quantitative variables, (2) by the Khi-square statistic derived from a contingency table for two qualitative variables, (3) by the intra-class correlation coefficient when a quantitative variable is classified by the qualitative variable (ANOVA). Significance of the observed values are established from their distributions obtained from a large number (e.g. 4999 to reach a 3-digit precision on p-values) of torus-translations. Upon request, complete randomisations can also be performed and would be valid to test the association between variables when at least one shows no spatial autocorrelation. Comparison of results under complete randomisations and torus-translations also allow to evaluate the risk of having false positives when applying tests of association ignoring spatial autocorrelation.

Computer requirement

TOROCOR runs on PC under Windows 9x or later versions.

How to run TOROCOR

TOROCOR has no nice user-friendly windows but it does not require installation; just bring the Torocor.exe file and the data files in some folder and drag-and-drop the icon of the data file on the Torocor.exe icon, the rest is written on the screen, but we suggest that you first have a look at the manual.

  1. Torocor_1-0.exe program

  2. Manual_Torocor_1-0.pdf manual

  3. data.txt data file for TOROCOR

How to cite TOROCOR

Hardy, O.J. 2009. TOROCOR: a program to assess the association between spatially autocorrelated variables using a torus-translation test on multiple grids. http://ebe.ulb.ac.be/ebe/Software.html

Webmaster  -  Copyright ebe
  1. Software



Genetic data analysis or simulation

Chemical data analysis

Community or ecological data analysis


Sampling method

OPEN SOURCEOpen_Source.htmlOpen_Source.htmlshapeimage_12_link_0