Dear Statalisters,
I have a panel data of 48 countries, each for 28 years. I want to create 48 matrixes corresponding to each country at once. So each matrix has 28 x 1 dimension. I have tried to use "forvalues", but it does not seem to work. See my codes below:
forvalues i=1/48{
mkmat undata if id==`i', matrix(y)
}
I am very new to Stata programming.
Thanks very much for your help.
I have a panel data of 48 countries, each for 28 years. I want to create 48 matrixes corresponding to each country at once. So each matrix has 28 x 1 dimension. I have tried to use "forvalues", but it does not seem to work. See my codes below:
forvalues i=1/48{
mkmat undata if id==`i', matrix(y)
}
I am very new to Stata programming.
Thanks very much for your help.
Comment