Dear all,
I am writing a function to save a matrix in Mata to a file using Mata functions (fopen, fputmatrix) which I need to process and do some calculations later on. It is fast I think, however, the file size of the Mata matrix is very big.
For example, my Mata matrix is 5 mil records x 100 variables, the Mata file size is about 3.72Gb. For the same number of records and variables, the Stata file size is about 700Mb. Similarly, a data of 50 mil records x 100 variables creates 40Gb in Mata size, and about 7.6Gb in Stata file.
Is there a way to compress and uncompress the Mata matrix file without affecting the speed of reading the data back to Mata?
Thank very much for any help.
Minh
I am writing a function to save a matrix in Mata to a file using Mata functions (fopen, fputmatrix) which I need to process and do some calculations later on. It is fast I think, however, the file size of the Mata matrix is very big.
For example, my Mata matrix is 5 mil records x 100 variables, the Mata file size is about 3.72Gb. For the same number of records and variables, the Stata file size is about 700Mb. Similarly, a data of 50 mil records x 100 variables creates 40Gb in Mata size, and about 7.6Gb in Stata file.
Is there a way to compress and uncompress the Mata matrix file without affecting the speed of reading the data back to Mata?
Thank very much for any help.
Minh
Comment