One minor problem with using -separate- is that the dummy variables may not
match range of the explanatory variable.
For example,
sysuse auto,clear
xi: reg price mpg i.rep
predict fit
separate fit, by(rep) veryshortlabel
twoway line fit? mpg, ytitle(Predicted Price)
will produce rather short lines for the dummy variables, which may not be desired.
Scott
----- Original Message -----
From: Nick Cox <[email protected]>
Date: Tuesday, November 9, 2004 9:09 am
Subject: RE: st: graphs linear regressions with dummies
> To follow up my previous posting, you
> can do this with less typing (and without changing
> your existing variables)
>
> sysuse auto,clear
> reg price mpg fore
> predict fit
> separate fit, by(foreign) veryshortlabel
> twoway line fit? mpg, clcolor(blue green)
> ytitle(Predicted Price)
>
> The -veryshortlabel- option is undocumented,
> but helpful here.
>
> Nick
> [email protected]
*
* 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/