[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: RE: st: graphs linear regressions with dummies
Agreed. If it is important to extrapolate beyond
the estimation sample, you need to do that
yourself with -predict- calls, as in your original
posting. I personally prefer to emphasise the range
of the data on which the fit is based, but other
emphases have their own logic.
> 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.
> > 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.
* For searches and help try: