Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

text in graph [was RE: st: R: bootstrap]


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   text in graph [was RE: st: R: bootstrap]
Date   Fri, 16 Jul 2010 21:21:17 +0000 (GMT)

--- On Fri, 16/7/10, sun samn wrote:
> PS. Could you tell me how to add text to the line in the
> region of graph as you did in your paper? thanks!

*------------- begin example -------------------
sysuse auto, clear
reg price i.foreign##c.mpg
predict yhat
twoway line yhat mpg if foreign == 0, sort || ///
       line yhat mpg if foreign == 1, sort || ///
       scatteri 5500 30 (3) "domestic"        ///
                4000 25 (9) "foreign",        ///
       msymbol(i) legend(off)                 ///
       xtitle("mpg") ytitle("predicted price")
*-------------- end example ----------------------

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index