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

st: RE: graphs linear regressions with dummies


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: graphs linear regressions with dummies
Date   Tue, 9 Nov 2004 15:05:53 -0000

I don't see anything puzzling in your main story. In 
essence whatever graph command you are using 
is ignorant of the fact that your predicted 
values define more than one straight line. 
If you say, somehow, join up these points as 
if they were one line, it will do precisely that, 
and the fact that the result is not straight is 
immaterial to Stata. As far as it is concerned, 
Stata gave you exactly what you asked for. 

In a revision yet to be made public, -regplot- 
on SSC has a -separate()- option for this
eventuality. For the moment, use -separate- 
to split your predicted values into distinct 
variables and then call up -twoway- with 
those as a bundle of y variables. 

I am not clear, however, about the way that fixed effects
enter here. 

Nick 
[email protected] 

[email protected]
 
> I am trying to graph a two-way plot of a dependent and an explanatory
> variable together with a fitted line, where the line is fitted with a
> linear regression containing two dummy variables. When I do, 
> the fitted
> line doesn't come out linear, but incorporates the fitted 
> values of the
> observations where the dummies are 1. The only way I found of 
> how to make
> the fitted line look linear is to exclude from the graph the two
> observations where the dummies are 1. Anyone know of a more
> elegant/efficient way ? Viz. what I find puzzling is that the 
> two dummies
> are screwing up the linear graph of the fitted line, but the 
> individual
> fixed effects which I also have in the regression are not ?
> 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index