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]

st: RE: Labeling Graphs


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Labeling Graphs
Date   Thu, 1 Apr 2010 20:51:03 +0200

<>

*******
sysuse auto, clear

qreg price weight, q(.25)
predict pred25
la var pred25 "0.25 Quartile Fitted Value"
qreg price weight, q(.5)
predict pred50
la var pred50 "0.50 Quartile Fitted Value"
qreg price weight, q(.75)
predict pred75
la var pred75 "0.75 Quartile Fitted Value"

tw scatter price weight|| line pred25 weight /* 
 */ || line pred50 weight || line pred75 weight

*******


HTH
Martin


-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Jeff
Sent: Donnerstag, 1. April 2010 20:42
To: statalist@hsphsun2.harvard.edu
Subject: st: Labeling Graphs

Ladies, Gentleman, Phds., and everyone on the list way smarter than me,

In Stata 10:

I went to the reference material but could not figure out the following:

Rather than go into the graph editor to label a graph, what would be the
syntax to save that step.

For instance:
I ran a quantile regression.  The following graph syntax does not label
the fitted lines by each quantile .25, .5, .75.

graph twoway scatter discount marketvalue || line pred25 marketvalue ||
line pred5 marketvalue || line pred75 marketvalue

The syntax above merely labels each quartile as "Fitted Value" w/o
identifying the quartile. I would prefer to label each quartile fitted
line specifically as "0.25 Quartile Fitted Value", "0.50 Quartile Fitted
Value", & "0.75 Quartile Fitted Value"

Thank you in advance.

Jeffrey B. Wolpin


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

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