Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: running a whole set of analyses for several subsamples
From
Phil Schumm <[email protected]>
To
Statalist Statalist <[email protected]>
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 <[email protected]> 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/