Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Sppack vs spatgsa


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Sppack vs spatgsa
Date   Mon, 11 Jun 2012 08:55:40 +0100

You are expecting -spatgsa- (M. Pisati, STB-60, 2001), written for
Stata 7, to be cognisant of Mata, added in Stata 9, in general and of
the results of -sppack- (D. Drukker et al. SSC, 2012) in particular.

This won't work directly. -spatgsa- is completely incapable of
recognising anything produced by Mata. How easy it is to convert Mata
results into something readable by -spatgsa- I couldn't say It may be
easiest to use the information you used to create your matrix to
create something readable by -spatgsa-.

Note that you are asked in the FAQ to say _where_ user-written
commands you refer to come from, and indeed to flesh out minimal name
(date) references.

Nick

On Mon, Jun 11, 2012 at 8:24 AM,  <LUCIANO.LAVECCHIA@bancaditalia.it> wrote:

> I have recently discovered the sppack command by Drukker et al. (2012)
> about spatial econometrics. I have used sppack to create a weighting
> matrix (it doesn't matter what type - the problem presents with
> contiguity, inverse distance, normalized, banded or not...), say W, and
> I wanted to use W with the Pisati's spatgsa  to compute Moran's I for my
> dataset.
>
> Unfortunately, once I run "spatgsa varname , weights(W) moran"
>
> I receive the following error message
>
> Matrix W does not exist.
>
> I suppose spatgsa doesn't recognize matrix created with sppack. Is there
> anyway to create a weighting matrix with sppack and to perform Moran's I
> (but also Geary's C and so on)?

*
*   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   |   Site index