[R-sig-Geo] Beginner help with SAR model

Peter Francis peterfrancis at me.com
Wed Apr 27 11:56:22 CEST 2011


Dear List,

I feel i must say i have very little experience with GIS systems and modelling geographical data so i apologise in advance. I have looked through the literature and mailing list archives with little success.

I want to model the correlates of three diversity indices - functional diversity (FD), phylogenetic diversity (PD) and species richness (SR).

I have built communities - or neighbourhoods - on a presence absence basis i.e does species occur in region 1, does species 2 occur in region 2 etc. The spatial data comes from WWF ecoregions (http://www.worldwildlife.org/science/data/item6373.html)  and the environmental predictors from the same place. Of the 600 odd ecoregions i  have 458 which are occupied. 

To date i have been using a GLS with the corExp function to model the spatial autocorrelation present in the dataset i.e the latitude and longitude of each ecoregion was included as a smooth factor in all-statistical models. However i have a feeling this may not be sufficient ( Kissling & Carl, 2008) so i wanted to use the package sdep to form a SAR.

Now to the problem - the data i have are .dbf file, .shp file and .shx file  - i can get more if needed. 

So to do a SAR i needed to construct a neighbourhood? and i called the following

ccShape=readShapePoly("/WWFBinaryitem6603/wwf_terr_ecos.shp")

ccNb=poly2nb(ccShape)

ccMat=nb2mat(ccNb,style='B')

and got Error in nb2listw(neighbours, glist = glist, style = style, zero.policy = zero.policy) : 
  Empty neighbour sets found

ccNb
Neighbour list object:
Number of regions: 14458 
Number of nonzero links: 16076 
Percentage nonzero weights: 0.007690624 
Average number of links: 1.111910 
8601 regions with no links:

Any help or advice would be greatly appreciated.

Peter



More information about the R-sig-Geo mailing list