Dear All,

I am using Stata 16. I try to run spatial regressions with sp commands. I am using an economic spatial weight matrix with 38000 X 38000 dimensions. The matrix is in a separate dta file and I am using "spmatrix fromdata" command to load it to Stata for spatial regressions. Although only 20% of the matrix is full of non-zero elements, it still requires a huge amount of memory and processing time. I think that with that command, Stata also considers the zero elements as a matrix element and it does not work with a sparse matrix, am I right? This is why the memory needs are big.

Do you have suggestions for me to decrease the memory needs? or is it possible to define the matrix as a sparse one so that it only stores the non-zero elements?

Your suggestions are very valuable for me.

Thank you in advance

Sevgi