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: Sppack vs spatgsa

From   Nick Cox <>
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.


On Mon, Jun 11, 2012 at 8:24 AM,  <> 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:

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