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

Gilles Benjamin Leduc gbl1 at hi.is
Wed Aug 20 18:16:49 CEST 2014


Hi, 

I read your post and I am not sure of understanding… 

What is your actual objective? What is you question? Maybe if I saw your dataset I may have a better idea… 

I just see you made a strange thing… You "Accept the null hypothesis" … that is a bad thing to do, Null hypothesis is to be rejected, never accepted… 
Either you reject it, then there is a significatif difference, or you cannot reject it, and that does not allow you to said anything, in that case it may mean that H0 is true, or you cannot see how it is different … Should I make you a stupid exemple to tell you case H0 cannot be rejected, but being obviously false? 
Best Regards
Benjamin 
 
 
 
Le Mercredi 20 Août 2014 15:58 GMT, Tim Richter-Heitmann <trichter at uni-bremen.de> a écrit: 
 
> 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