[R-sig-Geo] Problem nblag_cumul
Roger Bivand
Roger.Bivand at nhh.no
Fri Oct 29 23:46:41 CEST 2010
On Thu, 28 Oct 2010, Roger Bivand wrote:
> 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.
Is the problem that you have a data set (maybe from GISCO) that includes
different NUTS levels in the same file? The one I'm looking at includes
IE, IE0 - identical, all Eire, then IE01 and IE02, which divide Eire into
two parts at NUTS2, then IE01?, IE02?, in total 8 NUTS3 regions? Which
level of NUTS are you working at, and where have your boundaries come
from? Are you sure that your file does not include multiple levels - I can
reproduce the problem when multiple levels are present, but not otherwise.
Roger
>
> 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