Hello,

I am looking for a solution to expand my matrices in Mata for some out of sample calculations. For example, we have population data for different 5 age-groups in 10 regions over 2000-2020 (matrix is 200x5). I would like to expand the matrix to include 20 additional years for each region (400x5).

Currently, I import the data to Stata and use xtset and tsappend commands and then import the data to Mata. I was hoping that I can do this directly in Mata.

Thank you.

I am looking for a solution to expand my matrices in Mata for some out of sample calculations. For example, we have population data for different 5 age-groups in 10 regions over 2000-2020 (matrix is 200x5). I would like to expand the matrix to include 20 additional years for each region (400x5).

Currently, I import the data to Stata and use xtset and tsappend commands and then import the data to Mata. I was hoping that I can do this directly in Mata.

Thank you.

## Comment