Here is an example that may do what you want. Obviously you can play
with it to make it look the way you want it to look.
sysuse auto, clear
graph twoway (scatter price weight) ///
(lfit price weight) ///
(scatter price weight if rep78==1) ///
(lfit price weight if rep78==1) ///
(scatter price weight if rep78==2) ///
(lfit price weight if rep78==2) ///
(scatter price weight if rep78==3) ///
(lfit price weight if rep78==4) ///
(scatter price weight if rep78==5) ///
(lfit price weight if rep78==5)
Best,
Alan
On 5/20/07, [email protected] <[email protected]> wrote:
I would like to do a twoway regress plot of vote for incumbent
president against real disposable income. However, I would like to
show the regression line not only for the sample as a whole, but for
four exclusive subsets of the data. Does anyone know how to do this?
Thanks ahead of time,
Chris
*
* 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/