<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6001.18183" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText59483 dir=ltr>
<DIV dir=ltr><FONT face=Arial size=2>Dear people of the Geo-R list,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr>
<DIV dir=ltr><FONT face=Arial size=2>I am very interested in&nbsp;the Spatial Eigenvector Mapping (SEVM) method in analysing my spatial&nbsp;data as described in your papers (Griffith and Peres-Neto 2006, Dormann et al. 2007). </FONT></DIV>
<DIV dir=ltr>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>However I am rather new to spatial analysis and therefore have some questions regarding the script provided in&nbsp;the appendix of Dormann et al. 2007.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT size=2>Code</FONT> 
<P align=left><FONT size=2>nb1.0 &lt;- dnearneigh(coordinates(snouter_sp), 0, 1.0)</FONT></P>
<P align=left><FONT size=2>nb1.0_dists &lt;- nbdists(nb1.0, coordinates(snouter_sp))</FONT></P>
<P align=left><FONT size=2>nb1.0_sims &lt;- lapply(nb1.0_dists, function(x) (1-((x/4)^2)) )</FONT></P>
<P align=left><FONT size=2>ME.listw &lt;- nb2listw(nb1.0, glist=nb1.0_sims, style="B")<FONT face=Georgia><FONT face=Georgia></P></FONT></FONT></FONT><FONT face=CourierNewPSMT><FONT face=CourierNewPSMT>
<P align=left><FONT size=2>sevm1 &lt;- ME(snouter1.1 ~ rain + djungle, data=snouter.df, family=gaussian,</FONT></P>
<P align=left><FONT size=2>listw=ME.listw)</FONT></P>
<P><FONT size=2># modify the arguments "family" according to your error distribution</FONT></P></FONT></FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>I hope&nbsp;someone who has experience in suing SEVM can give me a hand with some of the questions I have. </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>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 -<FONT face="Times New Roman">ME.listw &lt;- nb2listw(nb1.0, glist=nb1.0_sims, style="B")</FONT><FONT face=Arial>?&nbsp; Lastly, can I specify t, the threshold distance instead of using a spanning tree algorithm?</FONT></FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>Some background information about my data - it is in long-lat coordinates, and I have calculated great circle distances.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>And the code I was trying to use:</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr>nb &lt;- dnearneigh(as.matrix(dat$x_long, dat$y_lat), 0, 4000, longlat=T)<BR>nb_dists &lt;- nbdists(nb, as.matrix(dat$x_long, dat$y_lat))<BR>nb_sims &lt;- lapply(nb_dists, function(x) (1/x))<BR>ME.listw &lt;- nb2listw(nb, glist=nb_sims, style="W", zero.policy=T)</DIV>
<DIV dir=ltr>&nbsp;</DIV>
<DIV dir=ltr>sevm1 &lt;- ME(lg.sp1 ~ lg.area, data=dat, family=gaussian, listw=ME.listw)<BR>lmlag1 &lt;- lm(lg.sp1 ~ lg.area + fitted(sevm1), data=dat)</DIV>
<DIV dir=ltr>moran&lt;- moran.test(residuals(lmlag1), listw=ME.listw, na.action=na.omit, zero.policy=T)<BR>moran</DIV>
<DIV dir=ltr><FONT face=Arial size=2><FONT face=Arial></FONT></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>Thank you in advance for your help! Hope to hear from you soon!</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>Many thanks,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Xingli</FONT></DIV>
<DIV id=idSignature80494 dir=ltr>
<DIV><FONT color=#000000>------------------------------------<BR>Xingli Giam<BR>Research Visitor<BR>Research Institute of Climate Change and Sustainability<BR>School of Earth and Environmental Sciences<BR>The University of Adelaide<BR>Mobile: +61 (0) 425 150 966<BR>Email: <A href="mailto:xingli.giam@adelaide.edu.au" target=_blank>xingli.giam@adelaide.edu.au</A><BR>Alt email: <A href="mailto:giam@nus.edu.sg" target=_blank>giam@nus.edu.sg</A><BR></FONT></DIV>
<DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>and</DIV>
<DIV>&nbsp;</DIV>
<DIV>M.Sc. Candidate</DIV>
<DIV>Department of Biological Sciences</DIV>
<DIV>National University of Singapore</DIV>
<DIV>(on study leave till 30 June 2009)</DIV></DIV></DIV>
<DIV dir=ltr><FONT color=#000000></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV></DIV>
<DIV id=idSignature91488 dir=ltr>
<DIV><FONT color=#000000>------------------------------------<BR>Xingli Giam<BR>Research Visitor<BR>Research Institute of Climate Change and Sustainability<BR>School of Earth and Environmental Sciences<BR>The University of Adelaide<BR>Mobile: +61 (0) 425 150 966<BR>Email: <A href="mailto:xingli.giam@adelaide.edu.au">xingli.giam@adelaide.edu.au</A><BR>Alt email: <A href="mailto:giam@nus.edu.sg">giam@nus.edu.sg</A><BR></FONT></DIV>
<DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>and</DIV>
<DIV>&nbsp;</DIV>
<DIV>M.Sc. Candidate</DIV>
<DIV>Department of Biological Sciences</DIV>
<DIV>National University of Singapore</DIV>
<DIV>(on study leave till 30 June 2009)</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></DIV></BODY></HTML>