I want to plot a twoway graph from a linear regression model that predicts the probability to be employed over age interacted with education while controlling for cohort effects. The resulting graph should include two lines (education is binary) and this works fine as long as I do not include any controls. However, as soon as I include controls in the regression model, the lines in the graph start to look funky (i.e. the lines become thick bars and there is something that looks like missing pixels at the beginning and at the end of those bars). It only works if I select a specific cohort in the graph command but this should not be necessary or am I making some conceptual mistake?
There already is a similar post about this issue (https://www.statalist.org/forums/for...-with-controls) but the solution there does not work for me.
I use the following code:
And a picture of the graph that I get:
There already is a similar post about this issue (https://www.statalist.org/forums/for...-with-controls) but the solution there does not work for me.
I use the following code:
Code:
reg emp c.age##i.educ c.cohort predict pr, xb graph twoway line pr age if educ==0 || line pr age if educ==1
Comment