[R-sig-Geo] Problem nblag_cumul

Roger Bivand Roger.Bivand at nhh.no
Thu Oct 28 20:56:42 CEST 2010


On Thu, 28 Oct 2010, Hauser, Christoph wrote:

> Hi all!
>
>
>
> As a newcomer to both r and spatial econometrics I am trying to become
> familiar with both worlds. I have a question which is hopefully not too
> trivial: I am trying to create a second order queen matrix for European
> regions. As indicated in the documentation on spdep nblag and
> cumul_nblag are the appropriate commands to carry out this task
> (starting from the poly2nb command). Both commands worked fine, but they
> provided me with a second order matrix with one region having zero
> second order neighbors  (IE01 - Central Ireland). When I tried to
> convert the nb object from cumul_nblag to a listw object the command
> failed with the error message that one region has zero neighbors. This
> struck me as odd given that the combination of first and second order
> matrices should make sure that each region has a neighbor (I don't have
> islands in my set). After inspecting the two neighbor matrices I noticed
> that the combination  of the two matrices based on cumul_nblag worked
> out for every region except the one with zero second order neighbors. My
> question now is if it is customary for nblag_cumul to endow each region
> that has zero second order neighbors also in the cumulated matrix with
> zero regions? Does that make sense from a theoretical point of view?
>

Please put the input data and your code on a website, post the link, and 
I'll try to see whether this is intended or not. It may well be that the 
region with no second order neighbours is causing havoc.

Roger

>
>
> I would be grateful for any help in this regard!
>
>
>
> Christoph
>
>
>
> PS: I am happy to provide my dataset if that is helpful.
>
>
>
> Dr. Christoph Hauser
>
> University of Innsbruck
>
> Department of Economic s
>
> Universitaetsstrasse 15
>
> 6020 Innsbruck
>
> Tel.: 0043 512 507 7354
>
> Fax: 0043 512 507 2980
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list