Hi!

I know that this question has already been published but the solution is not actually what I am looking for.

I am a beginner user of Stata and I have a data set with patients information and Mata matrix with population survival probabilities. The mata matrix is stratified by sex, age and calendar year:

| sex _year _age survprob | |-------------------------------| | 1 2000 50 .99376 | | 1 2000 51 .99318 | | 2 2000 50 .99751 | | 2 2000 51 .99744 |

I am looking for either:

1. Save the mata matrix of population mortality rates as .dta file which I can merge m1 with patients data file aftrewords OR

2. Merge mata matrix with .dta file by sex,age and calendar year.

I am grateful for any advice.

Thank you very mych in advance.

Regards,

Yuliya

I know that this question has already been published but the solution is not actually what I am looking for.

I am a beginner user of Stata and I have a data set with patients information and Mata matrix with population survival probabilities. The mata matrix is stratified by sex, age and calendar year:

| sex _year _age survprob | |-------------------------------| | 1 2000 50 .99376 | | 1 2000 51 .99318 | | 2 2000 50 .99751 | | 2 2000 51 .99744 |

I am looking for either:

1. Save the mata matrix of population mortality rates as .dta file which I can merge m1 with patients data file aftrewords OR

2. Merge mata matrix with .dta file by sex,age and calendar year.

I am grateful for any advice.

Thank you very mych in advance.

Regards,

Yuliya

## Comment