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
How to create individual panel data through merging two cross sectionsHello All I am in need of desperate help regarding my model. I have cross-section data done for two …
Using Loops with tabulationHi there, I never really learned how to use loops, but feel like in this scenario it might be useful…
Event study versus difference-in-difference.Dear All, I am trying to evaluate the impact of a treatment using difference-in-difference and even…
Export matrix to excel. How to asign rows on a loopHello, I'm estimating a model where I have 74,000 equations, and I want to export the estimators to…
how to deal with '' xthenreg'' for dynamic threshold modelsDear all Finally we get the stata' command to deal with the endogeneity issue for threshold model, …
Subscribe to:
Post Comments (Atom)
0 Response to Merge Mata matrix with Stata data file
Post a Comment