Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: spatial weight matrix in stata

From   Austin Nichols <>
Subject   Re: st: spatial weight matrix in stata
Date   Sun, 6 Nov 2011 11:22:33 -0500

Ajita Atreya <>:
Presumably, these are real estate markets and it is not just
contiguity but farther neighbors that matter, so you should prefer
inverse distance weighting.  I am guessing, but merely guessing, that
islands are close to no other obs, so your banding has made them
infinitely far from all potential neighbors.  For further help, you
might want to contact the package authors, but you would want to make
sure you have carefully read and understood all the PDF documentation
referred to in their help files before you approach them for help.

On Sun, Nov 6, 2011 at 11:14 AM, Ajita Atreya <> wrote:
> Hi Nichols,
> I have installed sppack and I am planning to use spreg for spatial error and spatial lag dependence model. Before that I used spmat to create a weighting matrix based on the coordinates of the properties. I used banded form of matrix since I have huge dataset. But I am getting a warning: spatial matrix contains 5123 islands. I was not sure what that meant. Also, if somebody could tell me whether conginuity or inverse-distance matrix is appropriate that would help me a lot. I repeat that I have a panel data (more than 18000 obs)  and each observation refers to a single property sold at time t.
> Thank You Ajita
> ----------------------------------------
>> Date: Sun, 6 Nov 2011 11:04:01 -0500
>> Subject: Re: st: spatial weight matrix in stata
>> From:
>> To:
>> Ajita Atreya <>:
>> This is misguided advice from Yuval, who is telling you how to
>> duplicate the effects of [aweight] for cell-average data (almost but
>> not quite--you would have to deal with the constant term as well);
>> instead you should use [aweight] (help weight) for such a model.
>> You want spatial analysis, and -findit spatial- produces a
>> bewilderingly long list. The place to start is
>> . findit sppack
>> and the references cited there.
>> On Sun, Nov 6, 2011 at 5:35 AM, Yuval Arbel <> wrote:
>> > Ajita,
>> >
>> > Generally speaking, you need to provide stata the weights by yourself.
>> >
>> > If each observation in the sample is average data for each census
>> > tract - you need to correct for hetheroskedasticity by multiplying
>> > each observation in the square root of the population size for each
>> > census tract.
>> >
>> > If each of your observation is not average but rather refers to
>> > specific properties - you can generate regional dummy variables and
>> > run -heckman-
>> >
>> > Finally, if your data is panel - you can use the -xtreg- command and
>> > run a fixed-effect model, which is also based on regional dummies
>> >
>> >
>> >
>> > On Sat, Nov 5, 2011 at 8:02 PM, Ajita Atreya <> wrote:
>> >> Hi,
>> >> I am trying to run spatial hedonic model. For that I need a spatial weight matrix. I have data on 24000 observations of property prices, the parcel number, lat  and long associated , census tract numbers, structural attributes, location attributes. It it possible to make a spatial weight matrix in stata for my dataset??

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index