[R-sig-eco] spatial correlation

Andrew Halford andrew.halford at gmail.com
Mon Nov 20 15:49:26 CET 2017


Hi Listers,

I am trying to better understand how spatial autocorrelation is determined.
I have attached 2 txt files one is a fish species x sites abundance table
and the other is a distance file with the lat and longs for each site
(converted to cartesian coords). I have run the tests for spatial
correlation using the methodology from the Borcard et al. Use R! book.

The result was no significant spatial correlation. However an nmds
ordination of the fish data shows 3 very strongly clustered groups of sites
which corresponds to 3 oceanic islands. A permutation analysis of the fish
resemblance matrix with a distance matrix was also highly significant with
a rho=0.646 spearmans rank correlation. To my mind I would have thought
that with such strong groupings in the data that spatial correlation would
be present at the scale of islands? Can someone help me explain this result?

My analysis below

fish_hellinger <- decostand (fish,"hellinger")
fish.xy # spatial dataset space_ed.txt

#test for overall trend
lineartest <- anova(rda(fish_hellinger,fish.xy))

Permutation test for rda under reduced model

Model: rda(X = fish_hellinger, Y = fish.xy)
         Df     Var      F N.Perm Pr(>F)
Model     2 0.17148 8.6098    199  0.005 ** ##significant linear trend
Residual 14 0.13942
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

 # fit linear trend to the fish data and then extract residuals for
subsequent use in spatial analysis
> fish_hellinger_detrended <- resid(lm(as.matrix(fish_hellinger)~
.,data=fish.xy))

# make a distance matrix from the residuals data for input to the
correlogram call
> fish_hellinger_D1 <- dist(fish_hellinger_detrended)

# perform the mantel-based test for spatial correlation
> (fish_correlogram <-
mantel.correlog(fish_hellinger_D1,XY=fish.xy,nperm=99))

Mantel Correlogram Analysis

Call:

mantel.correlog(D.eco = fish_hellinger_D1, XY = fish.xy, nperm = 99)

        class.index      n.dist  Mantel.cor Pr(Mantel) Pr(corrected)
D.cl.1   118.013676  462.000000   -0.042424       0.11          0.11
D.cl.2   352.037024    0.000000          NA         NA            NA
D.cl.3   586.060371    0.000000          NA         NA            NA
D.cl.4   820.083719    0.000000          NA         NA            NA
D.cl.5  1054.107067  384.000000    0.033639       0.30            NA
D.cl.6  1288.130414    0.000000          NA         NA            NA
D.cl.7  1522.153762    0.000000          NA         NA            NA
D.cl.8  1756.177109  320.000000          NA         NA            NA
D.cl.9  1990.200457    0.000000          NA         NA            NA
D.cl.10 2224.223804    0.000000          NA         NA            NA
D.cl.11 2458.247152  240.000000          NA         NA            NA


-- 
cheers

Andy


Andrew Halford Ph.D
Research Scientist (Kimberley Marine Parks)
Dept. Parks and Wildlife
Western Australia

Ph: +61 8 9219 9795
Mobile: +61 (0) 468 419 473
-------------- next part --------------
LUT_GIBB	LUT_FULV	CHL_STRO	SCA_PRAS	NAS_LITU	KYP_VAIG	LUT_BOHA	SCA_RUBR	NAS_UNIC	HIP_HARI	APH_FURC	NAS_ELEG	CHL_ENNE	KYP_CINE	NAS_BREV	CEP_ARGU	BOL_MURI	LUT_KASM	CHL_MICR	LET_OBSE	LUT_DECU	VAR_LOUT	CET_BICO	LUT_MONO	NAS_VLAM	HIP_LONG	CHE_UNDU	GRA_ALBO	NAS_CAES	ACA_XANT	LUT_RIVU	CEP_MINI	COR_AYGU	COR_GAIM	LET_XANT	TRI_OBES	NAS_FAGE	PMS_LAEV	LET_ERUS	LET_OLIV	CAC_MELA	CAC_AMBL	EPI_FUSC	NAS_HEXA	PMS_AREO	APR_VIRE	SCA_GHOB	SCA_XANT	EPI_TAUV	EPI_POLY	EPI_MACR	LET_EHUS	AET_ROGA	NAS_TONG	VAR_ALBI	LET_HARA	SYM_NEMA	
Coc1	1	6	16	5	9	0	6	1	20	17	0	9	0	14	3	0	0	0	0	10	0	1	0	3	0	0	0	0	1	0	0	0	0	0	0	0	0	0	1	0	1	0	1	0	0	0	1	0	0	0	0	0	0	0	0	0	0
Coc4	0	0	1	24	12	0	0	7	4	24	0	15	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	1	0	0	0	1	2	1	0	0	0	1	1	0	0	0	0	0	0	0	0	0	0
Coc8	5	21	22	19	15	6	4	6	8	11	0	28	0	3	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0	0
Imp9	195	0	0	0	16	6	13	6	32	0	1	0	0	6	16	10	11	0	5	0	5	2	11	0	0	7	4	0	0	3	0	0	2	0	0	3	8	3	0	3	0	3	0	0	1	1	0	0	0	0	0	0	0	0	0	0	0
-------------- next part --------------
LAT	LONG	
Coc1	10780.76	-1335.326
Coc4	10779.5	-1335.06
Coc8	10785.59	-1337.317
Coc12	10780.08	-1336.277
Coc13	10777.29	-1342.804
Coc16	10777.62	-1345.016
Coc18	10778.98	-1339.375
Coc23	10780.52	-1337.295
Coc25	10778.78	-1348.324
Coc28	10780.47	-1350.227
Coc34	10784.83	-1336.664
Coc35	10785.78	-1338.755
X1	11750.95	-1155.076
X2	11754.07	-1156.99
X4	11750.57	-1158.306
X7	11747.88	-1162.078
X9	11749.43	-1155.939
X10	11763.62	-1151.669
X11	11764.79	-1151.835
X12	11766.23	-1151.47
X14	11767.03	-1153.384
X16	11767.1	-1155.994
X18	11766.98	-1158.239
X19	11765.28	-1159.777
X20	11763.99	-1162.885
X21	11762.99	-1166.181
X22	11759.46	-1156.282
X24	11762.2	-1153.782
Cl1	13287.19	-1908.418
Cl2	13286.38	-1907.632
Cl3	13288.95	-1911.594
Cl5	13283.59	-1909.513
Cl6	13282.85	-1911.118
Imp1	13241.55	-1935.344
Imp2	13242.79	-1935.809
Imp4	13243.45	-1937.547
Imp7	13237.1	-1941.398
Imp9	13235.16	-1944.386


More information about the R-sig-ecology mailing list