[R-sig-Geo] Beginner's question on choosing the correct test

Tim Richter-Heitmann trichter at uni-bremen.de
Wed Aug 20 17:58:07 CEST 2014


Hi there,

i am new to the spatial statistics, so please bear with me.

My dataset consists of 60 plots, semi-randomly distributed on a 10x6m 
area. We measured species data on  6 sampling dates, so i ended up with 
six different sample by species matrices.
My first task should be to evaluate the spatial autocorrelation for each 
of the species we have found. I am also going to do variogramming and 
kriging based on the moran I results (is that a feasible approach? or 
are correlograms and variograms redundant? - i would like to have a 
single number to decide if each of my species is SACed or not).

I got very basic R code running from the spdep package:

#my species data
data <- read.table("species.txt", header = TRUE, sep = "\t", dec = ".")
#x,y coordinates
apr.D <- read.table("xy_april.txt", row.names=1, header = TRUE, sep = 
"\t", dec = ",")
#april only (only 59 plots!)
ap<-data[1:59,]

library(spdep)
nb <- tri2nb(apr.D)
list <- nb2listw(nb)
moran.test(ap$Ac2, list)
moran.mc(ap$Ac2, list, nsim=999)

For now, i have omitted every single option spdep is giving me. 
Everything is on default.
Do you have any suggestions that really should be done during the 
process (for example, should the neighbor list made differently?). As 
this particular species ("Ac2") is normally distributed, i end up with 
the same results for the moran statistic.
Another question would be, if all attempts of transformation fail to 
normalize a data series, can i even work with moran and variograms at 
all for this particular data series?

The problem is, i tried also another package "ape".
#create an inverse distance matrix (as suggested from some internet site)
apr.Dis <- as.matrix(dist(apr.D))
apr.Dis.Inv <- 1/as.matrix(dist(apr.D))
diag(apr.Dis.Inv) <- 0
library(ape)
Moran.I(ap$Ac2, apr.Dis.Inv)

And i get a different test statistic:

_Output spdep_

Moran's I test under randomisation

data:  ap[, 1]
weights: list

Moran I statistic standard deviate = 11.7323, p-value < 2.2e-16
alternative hypothesis: greater
sample estimates:
Moran I statistic       Expectation          Variance
        0.89241144       -0.01724138        0.00601157



_Output ape:_

$observed
[1] -0.003425159

$expected
[1] -0.01724138

$sd
[1] 0.02363168

$p.value
[1] 0.5587843



I understand that both coordinate matrices seem to be different, but as 
a beginner i have very hard times to decide what is wrong or right.
Curiously, the value for expected is the same, so i guess the calculus 
is correct, but maybe i am not aware of different approaches of the two 
packages? Either way, sdpep makes me reject the null 
(alternative=greater), so i think there is a non-random spatial process 
underlying the data. On the other hand, ape makes me accept the hull 
hypothesis of random spatial processes.

Any help on this matter is highly appreciated!

-- 
Tim Richter-Heitmann (M.Sc.)
PhD Candidate



International Max-Planck Research School for Marine Microbiology
University of Bremen
Microbial Ecophysiology Group (AG Friedrich)
FB02 - Biologie/Chemie
Leobener Straße (NW2 A2130)
D-28359 Bremen
Tel.: 0049(0)421 218-63062
Fax: 0049(0)421 218-63069


	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list