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]

st: estpost tabulate


From   Miranda Kim <[email protected]>
To   [email protected]
Subject   st: estpost tabulate
Date   Mon, 12 Apr 2010 12:33:50 +0100

I am trying to add an extra column and row in a table using estpost as follows:

sysuse auto, clear
xtile mpg3 = mpg, nq(3)
xtile weight3 = weight, nq(3)

eststo: estpost tabulate mpg3 weight3, nototal
esttab, cell(b pct(fmt(3))) unstack noobs nonum coll(none)

I would like to add to following percentage totals:
mat totU = el(e(pct),1,4) + el(e(pct),1,7) + el(e(pct),1,8)
mat totL = el(e(pct),1,2) + el(e(pct),1,3) + el(e(pct),1,6)
mat totD = el(e(pct),1,1) + el(e(pct),1,5) + el(e(pct),1,9)

where totU would be in row 1 column 4
totL in row 4 column 1
and totD in row 4 column 4
But I have not succeeded in adding these extra column 4 and row 4 into the table.
I have tried using estadd, but have not achieved it yet.
I tried
mat colname totU = 4:1
estadd mat totU: est1

Any suggestions on this would be of great help!
Thanks a lot!
Best wishes,
Miranda


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


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