Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Megan Fesinmeyer <mfesinme@WHI.org> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | st: RE: AW: RE: RE: Estout for metan? |
Date | Thu, 5 Aug 2010 12:20:14 -0700 |
This is a wonderful, simple solution, and seems that it should work for my analyses. Except, when I run the -statsby- command, although all the meta-analyses appear to run (and all 187 forest plots flash by on my screen), the resulting dataset is empty. There's a variable for each of the scalars stored in (r), but all of the values are missing. Any ideas what I'm doing wrong? Thanks again, Megan -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss Sent: Thursday, August 05, 2010 8:49 AM To: statalist@hsphsun2.harvard.edu Subject: st: AW: RE: RE: Estout for metan? <> Re -statsby-, also see NJC`s recent http://www.stata-journal.com/article.html?article=gr0045 HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Roger Harbord Gesendet: Donnerstag, 5. August 2010 17:43 An: statalist@hsphsun2.harvard.edu Betreff: st: RE: RE: Estout for metan? An alternative solution should be possible using -statsby-. You'd need to first append all your study data into a single large file and create an extra ID number to indicate which meta-analysis each study belongs to (you could probably do that with a single very long command of the form -append using file1 file2...file200, generate(metaid)- ). You should then be able to use -statsby- to automatically loop over the meta-analyses and collect the various results you want that -metan- returns in r(). Roger. -- Roger Harbord http://www.epi.bris.ac.uk/staff/rharbord.htm On 30 July 2010 17:06, Megan Fesinmeyer <mfesinme@whi.org> wrote: > Thank you so much for this idea! I will give it a try. I had sort of given up yesterday, and spent the day reformatting my data to perform meta-analysis in METAL software. I'd much rather use Stata, so it would be great if I can get this approach to work. > > > > -----Original Message----- > From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Tiago V. Pereira > Sent: Thursday, July 29, 2010 1:14 PM > To: statalist@hsphsun2.harvard.edu > Subject: st: RE: Estout for metan?, > > Megan, > > A very straightforward solution is to create a folder with all your > meta-analyses numbered from 1 to 200, say, meta_analysis_1.dta, > meta_analysis_2.dta, and so on. Then, loop over them storing the results > as locals. Finally, create a single file will all results and use > -outsheet- to get a xls file (tab-delimited by default). > > > An very simple example is presented below. > > > All you need to modify is the path to find your files. If you use windows > the paths are like > > "C:\myfiles\meta_analysis_`i'.dta" > > Hope this helps. > > Copy-paste tasks are really prone to errors! Let me know if this simple > code works for you. I did not check its accuracy. > > Tiago > > * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/