[R-sig-Geo] poly2nb neighbour itself should be considered a neighbour

Dexter Locke dexter@|ocke @end|ng |rom gm@||@com
Sun Nov 3 21:46:36 CET 2019


Dear Robert,

It sounds like what you are looking for is typically called a second order neighbor. Higher order neighbors can also included in a weights matrix such as your neighbors’, neighbors’, neighbor which is a third-order neighbor. I think you are seeking second-order neighbors. 

See the spdep vignettes, and the section 5 Higher-Order Neighbors subsection here: https://cran.r-project.org/web/packages/spdep/vignettes/nb.pdf in particular. The spdep::nblag might be what you need, but without additional information it is hard to know. 

Good luck,
Dexter
dexterlocke.com



> On Nov 3, 2019, at 2:12 PM, Robert R <usercatch using outlook.com> wrote:
> 
> Dear All,
> 
> I would like to know if the function "poly2nb" ("spdep" package.) let me create a neighborhood of itself, i.e., not only its queen neighbors (queen=TRUE), but a neighbour itself should also be considered a neighbour.
> 
> I am looking to create a queen weight neighborhood matrix afterwards using "nb2listw".
> 
> Any help would help me a lot.
> 
> Many thanks
> 
>    [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list