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]
st: Creating a table with sample restriction specifics in headers
From
Stephen Cranney <[email protected]>
To
[email protected]
Subject
st: Creating a table with sample restriction specifics in headers
Date
Mon, 20 May 2013 11:44:23 -0400
Hi all,
I'm looping a regression over approximately a dozen countries X 3
years= 21 different samples. Instead of going through and eyeballing
each set of regressions one by one, I want to compile them all into a
table and automatically head each table with the sample that that
regression is limited to. The variable that restricts the sample is
numeric, but the labels are string (CZ_08, for example, is the Czech
Republic in 2008). In other words, is there a way to create a macro
from a variable label, and then directly input that macro into the
header of an estout or estimates table.
levelsof V7, local(levels)
foreach l of local levels {
ologit V36 V33 $demo if V7 == `l'
tab V6 if e(sample)==1
tab Year if e(sample)==1
est store
}
Thanks in advance,
Stephen
*
* 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/