Bookmark and Share

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: RE : RE : st: Super-Columns with Esttab


From   Rebecca Pope <[email protected]>
To   [email protected]
Subject   Re: RE : RE : st: Super-Columns with Esttab
Date   Thu, 6 Dec 2012 14:03:46 -0600

Sylvain wrote:
<snip>
I have tried something with -prehead()- and -posthead()- instead. The
following code gives a table quite close to what we are looking for:

esttab dom1 dom2 for1 for2 using test.rtf, append nomtitles nonumber
posthead("{\trowd\trgaph108\trleft-108\clbrdrt\brdrw10\brdrs\cellx1548\clmgf\clbrdrt\brdrw10\brdrs\cellx3564\clmrg\clbrdrt\brdrw10\brdrs\cellx5580\clmgf\clbrdrt\brdrw10\brdrs\cellx7596\clmrg\clbrdrt\brdrw10\brdrs\cellx9612\pard\intbl\ql{}\cell\pard\intbl\qc{Domestic}\cell\pard\intbl\qc{}\cell\pard\intbl\qc{Foreign}\cell\pard\intbl\qc{}\cell\row}")

Ideally, we would want to use -prehead()- instead of -posthead()- and
remove the -nonumber- option so as to have the columns numbered below
the super-columns "Domestic" and "Foreign". However, that corrupts the
rtf file... (some lines of code are missing at the beginning of the
file.)
<snip>

As I understand the -esttab- .ado file, the table is automatically
defined in "head". However, since the file is written in the order
"prehead", "head", and "posthead", if you supply text in -prehead()-,
you also need to give a table definition. The plot thickens...

-prehead()- as specified is already unweildy, so let's start breaking it up.
local tabdef "{\rtf1\ansi\deff0 {\fonttbl{\f0\fnil Times New
Roman;}}{\footer\pard\qc\plain\f0\fs24\chpgn\par}"
local trowd "{\trowd\trgaph108\trleft-108"
local brdrs "\clbrdrt\brdrw10\brdrs"
local par "\pard\intbl"

esttab dom1 dom2 for1 for2 using test.rtf, replace nomtitles ///
prehead("`tabdef'`trowd'`brdrs'\cellx1548\clmgf`brdrs'\cellx3564\clmrg`brdrs'\cellx5580\clmgf`brdrs'\cellx7596\clmrg`brdrs'\cellx9612`par'\ql{}\cell`par'\qc{Domestic}\cell`par'\qc{}\cell`par'\qc{Foreign}\cell`par'\qc{}\cell\row}")

This gets us closer. There are two problems from my perspective. The
first, as already noted, is that scalability quickly becomes an issue.
The second is aesthetic - there is a border between the row with the
supercolumn titles and the row of model numbers.

I think the border is beyond our control. I'll address scaling in another post.

Cheers,
Rebecca


<snip>

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index