Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Austin Nichols <austinnichols@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: esttab rtfutil |
Date | Wed, 30 May 2012 11:04:13 -0400 |
Jörg Eulenberger <j.eulenberger@web.de>: Try these. *Method 1: use -rtfutil- and make sure graphs are sent with rtf cap ssc inst rtfutil cap ssc inst estout set more off sysuse auto, clear tempname h1 loc f1 mydoc1.rtf rtfopen `h1' using `f1', replace file write `h1' _n "{\pard\b Auswertung Sofub \par}" file write `h1' _n "{\line}" sc mpg price, mlabel(make) || lfitci mpg price graph export "myplot1.wmf", replace file write `h1' "{\pard\b Abbildung 1: Test 1\par}" _n rtflink `h1' using "myplot1.wmf" file write `h1' _n "{\line}" sc price mpg, mlabel(make) by(for) gr export "myplot2.wmf", replace file write `h1' "{\pard\b Abbildung 2: Test 2\par}" _n rtflink `h1' using "myplot2.wmf" estpost tabulate foreign rep78 file write `h1' _n "{\pard \par}" _n rtfclose `h1' loc op cell(colpct(fmt(1))) unstack noobs app varlabels(`e(labels)') loc op `op' varw(30) nonumber nomtitle collabels(none) loc op `op' eqlabels(,lhs("Test")) mlabel("Test2") esttab using `f1', rtf `op' !start `f1' *Method 2: use -png2rtf- cap ssc inst png2rtf file close _all sysuse auto, clear qui reg foreign rep78 tempname h1 loc f1 mydoc2.rtf loc on nonum nonote nomti noobs cell(none) noline esttab . using `f1', rtf `on' replace ti(\b Auswertung Sofub) sc mpg price, mlabel(make) || lfitci mpg price graph export myplot1.png, replace esttab . using `f1', rtf `on' a ti(\b Abbildung 1: Test 1) png2rtf using `f1', gr(myplot1.png) append sc price mpg, mlabel(make) by(for) graph export myplot2.png, replace esttab . using `f1', rtf `on' a ti(\b Abbildung 2: Test 2) png2rtf using `f1', gr(myplot2.png) append esttab . using `f1', rtf `on' a ti({\pard \par}) estpost tabulate foreign rep78 loc op cell(colpct(fmt(1))) unstack noobs app varlabels(`e(labels)') loc op `op' varw(30) nonumber nomtitle collabels(none) loc op `op' eqlabels(,lhs("Test")) mlabel("Test2") esttab using `f1', rtf `op' file open `h1' using `f1', write append file write `h1' _n "}" _n file close _all !start `f1' On Wed, May 30, 2012 at 8:46 AM, Jörg Eulenberger <j.eulenberger@web.de> wrote: > > Dear Statalisters, > > i want to use the esttab-command in combination with rtfutil. > Is it possible to get the esttab-output in the rtf-output? * * 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/