[R] Cross correlation/ bivariate/ mantel

Marcelino de la Cruz marcelino.delacruz at upm.es
Wed May 24 15:05:09 CEST 2006

McClatchie, Sam (PIRSA-SARDI <mcclatchie.sam <at> saugov.sa.gov.au> writes:

> > Colleagues
> > 
> 	I have two spatial datasets (latitude, longitude, fish eggs) and 
(latitude, longitude, fish larvae) at
> the same 280 stations (i.e. 280 cases). I want to determine if the 2 datasets 
are spatially correlated. In
> other words, do high numbers of larvae occur where there are high numbers of 
eggs? I would like to calculate
> the cross correlation for these bivariate data and calculate a Mantel 
statistic as described on pg. 147 of
> Fortin and Dale 2005 "Spatial analysis".

Package ade4 has mantel.randtest  and package vegan has mantel . Both functions 
find the Mantel statistic. If you need partial Mantel statistic, you can try 
partial.mantel in vegan or this code that I contributed some time ago:


Marcelino de la Cruz
Departamento de Biologia Vegetal
Universidad Politecnica de Madrid

More information about the R-help mailing list