Bookmark and Share

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


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

Re: st: missing values after splagvar


From   "Michael Ralph M. Abrigo" <[email protected]>
To   [email protected]
Subject   Re: st: missing values after splagvar
Date   Wed, 23 Mar 2011 16:09:16 +0800

Hi, Saraly!

I can't remember exactly but I had the same problem some time back
when I was tinkering with a time-space dynamic panel model. What I did
was -reshape-d the data to wide format, computed for the weight matrix
using -spwmatrix-, generated the spatial lags using -splagvar-, and
-reshape-d the data back to its original format. I know this is a
dirty job. I think I also tried tinkering with Mata and Kroneker
product to come up with a block diagonal matrix which I used to
generate the spatial lags in the original format of my data.

Cheers,
Michael
On Wed, Mar 23, 2011 at 2:03 AM, Andrade de Sa Saraly
<[email protected]> wrote:
>
> Dear all,
>
> I have a panel dataset for all counties of a given country and I am trying to see whether deforestation in the northern counties can be explained, among other factors, by expansion of a given crop in more southern counties.
>
> For this analysis I thought about using spatial methods. I therefore constructed an inverse-distance weight matrix using -spwmatrix- (from SSC):
>
> . spwmatrix gecon latitude longitude, wname(W) wtype(inv) cart rowstand eignvar(eigen).
>
> Up to this point, everything seems to work fine.
> Then I try to created spatial lags of my dependent variable (cleared) and some independent variables (cattle, pasture, roads, etc) using -splagvar- (also from SSC):
>
> . splagvar cleared, wname(W_n) wfrom(Mata) ind(cattle natpast plpast pop gdpcap avroads sgcn soya) order(2)
>
> My problem is that, at this stage, there are only missing values for the spatial-lagged variables.
>
> Do any of you have an idea about what I might be doing wrong?
>
> Thank you in advance,
> Saraly
>
> *
> *   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/



--
"I am most anxious for liberties for our country... but I place as a
prior condition the education of the people so that our country may
have an individuality of its own and make itself worthy of
liberties... " Jose Rizal,1896

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index