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
Related Posts with Spmatrix command and its memory need
Storing a command as a macroHello Statalist, I am writing a long .do file that uses the same command at many different points: …
Difference in differences in Panel StructureHello everyone, My data set contains 63 teachers (i) from 20 schools in a panel data format with T=…
graph save errorThe following example in Stata 16.1 on a PC and Stata 12.1 on a Mac produces the same error: Code:…
Calculate average within-unit correlation of variable across timeI have a panel dataset at the firm-year level. I would first like to calculate, within each firm, th…
Loop Encode but ignore "."Hello, I have a dataset with ~881k observations and 621 variables that I'm just beginning to clean.…
Subscribe to:
Post Comments (Atom)
0 Response to Spmatrix command and its memory need
Post a Comment