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: spmat idistance error

From   Ajita Atreya <>
To   <>
Subject   RE: st: spmat idistance error
Date   Wed, 1 Feb 2012 04:13:29 +0000

Hi Rafal,

I could eventually create an inverse distance matrix when I worked in a 64bit computer(stataIC 12 (64BIT)) but was unable to execute in 32 bit (StataIC 12 (32bit)). However, when I tried to use my matrix in spreg command I got the following error message after running for about 9hrs. 

SPMAT_matop():  3900  out of memory          SPIVREG_main():     -  function returned error                 <istmt>:     -  function returned errorI wanted to check if Mac version of stata would work for me. Unfortunately, I got an error message:

"Division by zero: Two or more spatial units have same coordinates" when I used the code: spmat idistance idoug longitude latitude,id(_ID)
dfunction(dhaversine) normalize(minmax) vtruncate(1/.1) banded. 

This is the same code that worked in 64 bit computer. I really don't understand what's going on??? Could you please help me sort this out.

PS. I have repeated observation of the same property and that is very important for my analysis.

Thank you in advance

University of Georgia

> From:
> To:
> Subject: st: spmat idistance error
> Date: Mon, 30 Jan 2012 14:16:23 -0600
> Ajita Atreya <> has a follow up question:
> > My code is: spmat idistance idoug longitude latitude, id(id)
> > dfunction(dhaversine) vtruncate(1/.2) normalize(minmax) banded
> > The command I used for running spatial regression is
> > spreg g2sls lnprice ........, id(id) dlmat(idoug) elmat(idoug)
> > My question here is can stata form a banded inverse-distance matrix
> > (24,000 obs) that I can use in my Spreg command.
> Ajita can send me the dataset privately. I will investigate and report back
> to the Statalist.
> --Rafal
> *
> * For searches and help try:
> *
> *
> *
*   For searches and help try:

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