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

st: graph with two trend lines


From   "Hans J. Baumgartner" <hbaumgartner@diw.de>
To   statalist <statalist@hsphsun2.harvard.edu>
Subject   st: graph with two trend lines
Date   Fri, 02 Aug 2002 11:28:51 +0200

Hi statalist,

I would like to draw a graph that shows all data point and (i) a trend
line over all data points and (ii) a trend line over selected data
points. 

reg x1 x2
predict yhat1
graph yhat1 x1 x2, connect (l.) symbol(i[x3]) trim (3)

This shows the desired graph with one trend line over all data points. 

reg x1 x2 if x4==1
predict yhat2

yhat2 shall be the second trend line over selected data points (x4 is a
dummy)

How has the graph command to look like?

Thanks for your help. 
Hans

-- 
Hans J. Baumgartner 
Deutsches Institut für Wirtschaftsforschung (DIW Berlin)
German Institute for Economic Research
Abt. Staat / Dept. Public Sector
Königin-Luise-Str. 5; 14195 Berlin (Dahlem) 
Tel.: 030/89789-307; Fax.: 030/89789-114
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index