Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Incorporating values of variable or parameter estimates in graph titles and labels


From   Daniel Mueller <[email protected]>
To   [email protected]
Subject   Re: st: Incorporating values of variable or parameter estimates in graph titles and labels
Date   Thu, 17 Mar 2005 16:26:03 -0500

After estimations type -eret list- and you'll, among others, see e(r2) to which you can refer as a local macro (`e(r2)')

In a graph you may do something like that:
--
sysuse auto
reg mpg weight
local r2 : di %6.0gc e(r2)
twoway (scatter mpg weight), ///
caption("R-Square is `r2'", ///
position(2) ring(0) size(large) ///
box bcolor(ltbluishgray))
--
Daniel

Dick Campbell wrote:

I find myself wanting to include the values of saved results, such as R-squared in the
titles, notes, text etc for various plots that I want to do. I can't seem to find a discussion in the manuals
or in the Mitchell book of how to do this. I know its possible, but I wonder if someone
can direct me to a compact discussion.

Richard T. Campbell
Professor of Biostatistics and Sociology
University of Illinois at Chicago
=======================================
Institute for Health Research and Policy M/C 275
University of Illinois at Chicago
1747 W. Roosevelt Road
Chicago, IL 60608
312-413-0480/ Fax 312-996-2703
[email protected]

Additional information at: http://www.uic.edu/~dcamp


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index