search for: morantest

Displaying 2 results from an estimated 2 matches for "morantest".

2007 Oct 26
1
Help needed on calculation of Moran's I
Hi, I am trying to calculate Moran's I test for the residuals for a regression equation, but I have trouble converting my coordinates into nb format. I have used the dnearneigh() funtion now with an arbitrarily high upper distance to make it include all plots. However, when I do the lm.morantest() I get a Moran's I value which is the same as the expected value and a P-value of 1. I have used the following code: >attach(lowland) >coords <- as.matrix(cbind(long, $lat)) >coord.nb <- dnearneigh(coords, 0, 10000 longlat=TRUE) >coord.list <- nb2listw(coord.nb, style=&qu...
2009 Aug 17
0
Question spdep package - Moran's I
...bles x that are unique to each person in my dataset. To test to which extent the autocorrelation effect is present even when accounting for the effect of x, I first did a regression y = f(x) + Epsilon and then used the regression residuals Epsilon to determine a Moran's I statistic using the lm.morantest function. One of the reviewers of my paper now states that this two step approach (first running a regression and then using the residuals to determine Moran's I) could be inefficient. S/he asks me to correct for the potential impact of x on y in one step when calculating Moran's I. Woul...