[Openspace] k-neighbors in GeoDA

Luis Galvis galvis at uiuc.edu
Sat Nov 24 10:00:13 CST 2007


> thank you so much for your response. The problem is that the results I get
> for a
> spatial-lag model using k-neighbor matrix in GeoDa are different from the
> R results. I do not have this problem if I use queen, rook, or threshold
> euclidean distance. This is why I thought that not being a symmetric weight
> matrix was causing this difference in results.
> Do you know why I could have this problem?
>

In page 202 of the Geoda Workbook it is noted that:
"... the ML estimation of the spatial lag model only works for
spatial weights that correspond to a symmetric contiguity relation. In other

words, it works for rook and queen contiguity, as well as distance band
contiguity, but not for k-nearest neighbors."

Nonetheless, you can use k-nearest neighbors for the diagnostics, i.e, for
the OLS part when you are testing for spatial effects.

L.






>
>
> *galvis at uiuc.edu* wrote:
>
> Chris is right, I am not necessarily one of the closest neighbor to my
> nearest neighbors. Think about this example, if you were to construct
> a 4-nearest neighbors that include Hawaii, you may fin that California
> is one of the closest neighbors, but for California's side, Hawaii is
> not one of the 4-nearest neighbors.
> On the other hand, the meaning of the "order of contiguity", refers to
> how many steps separate me from my neighbors. In a regular grid,
> following a queen criterion, it would be just the 8 cells surrounding
> any particular cell. Second order of contiguity should then have 16
> neighbors. If you think about it, you may figure out why yo didn't
> have the asymmetry "problem" when creating euclidean, queen or rook
> weigh matrices.
>
> L.
>
> On 11/22/07, Richard Ngetich wrote:
> > Dear German
> >
> > Perhaps you meant to ask what is the meaning of "the order of
> contiguity"?
> >
> > Richard
> >
> > -----Original Message-----
> > From: German Muchnik Izon [mailto:german at unm.edu]
> > Sent: Wednesday, November 21, 2007 8:53 PM
> > To: openspace at sal.uiuc.edu
> > Subject: [Openspace] k-neighbors in GeoDA
> >
> > Hi,
> >
> > Does anyone know how GeoDA creates a weight matrix based
> > on, for instance, 4 neighbors? Does it use distance to
> > determine the closets four neighbors?
> > I imported a 4-neighbor weight matrix I created in GeoDA
> > to R but when I check for symmetry, R tells me that the
> > matrix is not symmetric. I did not have this problems with
> > other weight matrices I created in GeoDA (i.e. euclidean,
> > queen, rook)?
> > Also, when I create rook or queen continuity weight
> > matrix, what is the meaning of "the order of continuity"?
> >
> > Thank you!
> > German.
> >
> >
> > _______________________________________________
> > Openspace mailing list
> > Openspace at sal.uiuc.edu
> > http://sal.uiuc.edu/mailman/listinfo/openspace
> >
> _______________________________________________
> Openspace mailing list
> Openspace at sal.uiuc.edu
> http://sal.uiuc.edu/mailman/listinfo/openspace
>
>
>
> ------------------------------
> Never miss a thing. Make Yahoo your homepage.<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
>


More information about the Openspace mailing list