I want to test a species' presence / absence records for spatial autocorrelation. My data contain >130,000 grids in GIS and with about 700 species' presence records.
I have read that the normal Moran's $I$ can't deal with this kind of data, but that the join count method in package spdep
can do it. However, I'm new to R
and I still can't understand the information and code in the help for joincount.mc
or joincount.test
.
My data is like this:
gridnumber species
1 1
2 0
3 0
4 1
……
I know how to read a shp.file
into R
and I know I must calculate the weight of my data, but the following steps with spdep
is beyond my ability.