Dear Statalist, I am long time reader, first time poster. I thank everyone for their previous contributions that have solved many a problem of mine.
I am new to Mata and am currently using it to store the results of a simulation model. I am using Mata because it is fast, and only to store data, not for any matrix algebra.
I finish with a Mata matrix mSum which I combine with a matrix of variable names cmSum using the _matrix_list command (another tip from someone on Statalist - thanks!)
I can convert this matrix mSum into Stata variables by first converting to a Stata matrix and then using svmat.
My problem is I lose all of the variable names that I have stored in Mata matrix cmSum.
Does anyone know if there is a way for me to convert mSum to Stata variables and use cmSum as the variable names?
I realise the solution may be don't use Mata in the first place and maybe at some point I'll figure out a more efficient method of storing and reading lots of large different sets of data without saving and loading datasets.
Thanks,
Adam
I am new to Mata and am currently using it to store the results of a simulation model. I am using Mata because it is fast, and only to store data, not for any matrix algebra.
I finish with a Mata matrix mSum which I combine with a matrix of variable names cmSum using the _matrix_list command (another tip from someone on Statalist - thanks!)
Code:
mata: _matrix_list(mSum, rmSum, cmSum)
Code:
mata: st_matrix("stSum", mSum)
Does anyone know if there is a way for me to convert mSum to Stata variables and use cmSum as the variable names?
I realise the solution may be don't use Mata in the first place and maybe at some point I'll figure out a more efficient method of storing and reading lots of large different sets of data without saving and loading datasets.
Thanks,
Adam
Comment