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
Related Posts with Merge Mata matrix with Stata data file
Merge with complex requirements for dateHey! I need to merge two files, each with 3 variables. The first one has date, city, and score. Th…
Dividing panel by quartilesHello everyone, I am dividing my panel data into 4 quartiles by country's GDP and year. A country m…
Rescaling y-axisI am unable to to re-scale my y-axis by a factor of 1000. For instance, I have counts of events on t…
sum, d and histogram with svy:Hello Statalist, I would like to run some descriptives of some model variables for subsequent model…
Markstat and PDF: Change the width of stata outputHi everyone, I am using markstat to make a pdf document. However, one of the stata results appeared…
Subscribe to:
Post Comments (Atom)
0 Response to Merge Mata matrix with Stata data file
Post a Comment