Hi
I'm trying to create a line graph with predicted (fitted) values from a regression where the dependent variable is continuous (log earnings) but the explanatory variable is categorical (educational attainments).
The graph I get looks like a "nest", with every point connected to the others, and is unreadable.

I do not understand why this is happening.
While playing around with my data, I managed to have it appear "clean" once, but ever since this has been happening, even though I don't think I changed anything.
I use stata 12.
Here is my code:
reg logearn i.educrec, r
predict discretefitted
twoway (line discretefitted educyears)
Thank you so much!
I'm trying to create a line graph with predicted (fitted) values from a regression where the dependent variable is continuous (log earnings) but the explanatory variable is categorical (educational attainments).
The graph I get looks like a "nest", with every point connected to the others, and is unreadable.
I do not understand why this is happening.
While playing around with my data, I managed to have it appear "clean" once, but ever since this has been happening, even though I don't think I changed anything.
I use stata 12.
Here is my code:
reg logearn i.educrec, r
predict discretefitted
twoway (line discretefitted educyears)
Thank you so much!
Comment