Dear list members,



in order to find the determinants of agricultural land prices I use a spatial hedonic pricing approach on a dataset of actual land sales transactions. I know the municipality of every transacted parcel but not the exact location within the municipality. Moreover, the dataset is highly unbalanced in a sense that we have many observations in one municipality but very few, if any, in others. The spatial weights should include observations in the same municipalities (but not itself) and, depending on the definition, contiguous municipalities (e.g. queens contiguity). In creating weights the use of "nb2blocknb" seems to work when starting from municipality centroid coordinates and working with gabrielneigh() and others. However, for robustness I would like to use an additional weight matrix which exactly meets above stated criteria (observations in the own and contiguous municipalities).



I am struggling how to use nb2block2 starting from a binary contiguity matrix in .csv or from polygons in a .shp file? Those objects contain all municipalities and therefore have different vector length than the observations file.

Even if I reduce the .csv matrix to municipalities where we actually have observations the question how do I come from a matrix to a "nb" object (or differently, is there something like "mat2nb") instead of to a listw object?

Can I delete "not used objects" directly in the "nb" object after creating the object by "poly2nb" to get length desired?



Sorry for the long and probably confusing problem description.



Best regards,



Paul Feichtinger



Total # of municipalities in Bavaria: 2050

Year: 1999

Observations: 3569 in 1198 municipalities

Mean: 2,98 observations/municipality

Max: Municipality 9........ with 30 land sales transactions

Municipalities providing only one transaction: 424

Municipalities providing two transactions: 274

Municipalities providing three transactions: 169



#Code example: Weights 1999

coords_99 <- (cbind(Xcoord,Ycoord))

bayaggr <- aggregate(coords_99, list(Gem=c_99$Gem), mean)

c_99_rel_2 <- graph2nb(gabrielneigh(as.matrix(bayaggr[,2:3])), as.character(bayaggr[,1]), sym=TRUE)

c_99_rel_2

c_99_block_3 <- nb2blocknb(c_99_rel_2, as.character(c_99$Gem))

head(c_99_block_3)

w_99_3 <- nb2listw(c_99_block_3, style="W")

---
Technische Universität München - TUM
Paul Feichtinger
Lehrstuhl für Volkswirtschaftslehre, Umweltökonomie und Agrarpolitik

Alte Akademie 14
85354 Freising
Tel: +49.8161.71.3574
Fax: +49.8161.71.3408
e-mail: Paul.Feichtinger@tum.de


	[[alternative HTML version deleted]]

