Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: spatial weighting matrix


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: spatial weighting matrix
Date   Wed, 8 Apr 2009 18:17:37 +0100

The queen terminology in spatial analysis comes via chess. 

Imagine squares on a chessboard. 

A queen can enter a neighbouring square either across a length of
boundary (over a link or edge in a boundary network) or diagonally (if
two areas touch at a vertex or node in a boundary network). 

A rook or castle is limited to the first of those. 

In chess there are of course also other rules but they do not enter
here. 

Thus "queen" implies contiguity wide sense and "rook" strict sense. 

The terminology goes back at least as far as the work of geographer
Andrew Cliff and econometrician-statistician Keith Ord in the late
1960s. 

In terms of the question, I implemented weighting matrices via string
variables [!!!] in -spautoc- on SSC in 1997, but I'd do it in Mata now,
but I don't have detailed advice, let alone code. 

Nick 
n.j.cox@durham.ac.uk 

Kyle Hood


I'm not sure what "first-order queen contiguity" is, but you will 
probably have to geocode address data (geocode: address->lat/lon), and I

don't think you can do this in Stata (that is, unless the breadth of 
Stata's capabilities is larger than I had realized, which is sometimes 
the case).  Try ArcGIS.  Once you have the geocoded data, you can 
probably compute the weight matrix in Stata, if you want.

max r wrote:

> I need to create a spatial weighting matrix (first-order queen
> contiguity) for a unbalanced panel dataset. The dataset has address
> information in it. Is there a way to do this in STATA? I am trying to
> test for neigborhood effects in behavior. Appreciate your thoughts.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index