Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Hilary Robbins <hrobbins827@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: Append existing columns using outreg2 |
Date | Thu, 30 May 2013 16:44:31 -0400 |
Hello, I am using outreg2 to export the results of many Cox models with different independent variables. For each model, I am exporting the same quantities (hazard ratio, p-value, confidence intervals). When I run successive models and append the excel file, outreg2 adds new columns for each Cox model, but I want to add downward (i.e. add the results to the existing columns for hazard ratio, p-value, and confidence interval). The new columns create an enormous amount of empty space in the excel file such that I cannot, for instance, sort the results from all the models by p-value. How can I append to the already existing columns using outreg2? Here is an example of what I'm trying to do, but in reality there are many more Cox models: stcox age gender var1 outreg2 using test, excel stats(coef ci pval) sideway eform cti(hr) noobs noaster keep(var1) replace stcox age gender var2 outreg2 using test, excel stats(coef ci pval) sideway eform cti(hr) noobs noaster keep(var2) append Thank you! * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/