Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Phil Schumm <pschumm@uchicago.edu> |
To | Statalist Statalist <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: running a whole set of analyses for several subsamples |
Date | Tue, 1 Apr 2014 08:00:07 -0500 |
On Apr 1, 2014, at 7:23 AM, Raffaele Palladino <palladino.raffaele@gmail.com> wrote: > For a dataset I have a whole set of analyses to run on a do file but I have to do the same for several subsambles defined by the values of a specific variable. At the moment I am adding at the end of each test (example) "reg.... if var==value" but I was wondering if I can use a command that can be somehow a time saver considering the total amount of statistical tests to run are more than 20 and the values of the variable quite a lot as well. You can use bys var: reg <model> to run the separate analyses, or, if you want to combine the results for each subgroup for further manipulation, use -statsby-. > I was also wondering if this type of command can work with svy and mi as well. Yes. -- Phil * * 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/