[R-sig-Geo] Specifying neighbourhood structure for Spatial Eigenvector Mapping (SEVM) using ME() in spdep
Xochitl CORMON
Xochitl.Cormon at ifremer.fr
Fri Sep 13 14:02:33 CEST 2013
Dear list,
I found a message asking same kind of things I am wondering.
Unfortunately I dont find proper answers and thus would like to update
the topic. Maybe Xingli could you share what your learn from the authors
with us to the questions below?
Regarding the weights, is it imperative for me to use (1-((x/4t)^2)? Can
we just do an inverse weighting system like (1/x)? Can I also use
weighted (C or W) instead of binary (B) weighting? Lastly, can I specify
the threshold distance instead of using a spanning tree algorithm?
Regards,
Xo
###### Original message
(SEVM) using ME() in spdep
Xingli Giam Xingli Giam
Jan 27, 2009 at 9:38 am
Dear people of the R-sig-Geo list,
I am very interested in the Spatial Eigenvector Mapping (SEVM) method in
analysing my spatial data as described in your papers (Griffith and
Peres-Neto
2006, Dormann et al. 2007).
However I am rather new to spatial analysis and therefore have some
questions
regarding the script provided in the appendix of Dormann et al. 2007.
Code
nb1.0 <- dnearneigh(coordinates(snouter_sp), 0, 1.0)
nb1.0_dists <- nbdists(nb1.0, coordinates(snouter_sp))
nb1.0_sims <- lapply(nb1.0_dists, function(x) (1-((x/4)^2)) )
ME.listw <- nb2listw(nb1.0, glist=nb1.0_sims, style="B")
sevm1 <- ME(snouter1.1 ~ rain + djungle, data=snouter.df, family=gaussian,
listw=ME.listw)
# modify the arguments "family" according to your error distribution
I hope someone who has experience in suing SEVM can give me a hand with
some of
the questions I have.
Regarding the weights, is it imperative for me to use (1-((x/4t)^2)? Can we
just do an inverse weighting system like (1/x)? Can I also use weighted
(C or
W) instead of binary (B) weighting in this line -ME.listw <- nb2listw(nb1.0,
glist=nb1.0_sims, style="B")? Lastly, can I specify t, the threshold
distance
instead of using a spanning tree algorithm?
Some background information about my data - it is in long-lat
coordinates, and
I have calculated great circle distances.
And the code I was trying to use:
nb <- dnearneigh(as.matrix(dat$x_long, dat$y_lat), 0, 4000, longlat=T)
nb_dists <- nbdists(nb, as.matrix(dat$x_long, dat$y_lat))
nb_sims <- lapply(nb_dists, function(x) (1/x))
ME.listw <- nb2listw(nb, glist=nb_sims, style="W", zero.policy=T)
sevm1 <- ME(lg.sp1 ~ lg.area, data=dat, family=gaussian, listw=ME.listw)
lmlag1 <- lm(lg.sp1 ~ lg.area + fitted(sevm1), data=dat)
moran<- moran.test(residuals(lmlag1), listw=ME.listw, na.action=na.omit,
zero.policy=T)
moran
Thank you in advance for your help! Hope to hear from you soon!
Many thanks,
Xingli
######
--
<>< <>< <>< <><
Xochitl CORMON
+33 (0)3 21 99 56 84
Doctorante en sciences halieutiques
PhD student in fishery sciences
<>< <>< <>< <><
IFREMER
Centre Manche Mer du Nord
150 quai Gambetta
62200 Boulogne-sur-Mer
<>< <>< <>< <><
More information about the R-sig-Geo
mailing list