Code:
sysuse auto, clear
*** marginsplot ***
reg price mpg i.foreign
predict yhat
margins foreign, at(mpg=(12(5)37 41))
marginsplot, noci title(, box bexpand) name(mplot, replace)
*** twoway ***
separate yhat, by(foreign) veryshortlabel
scatter yhat? mpg, connect(L L) title("Adjusted Predictions of foreign", box bexpand) name(twoway, replace) ylabel(0(2000)10000) xlabel(12(5)37 41) ytitle("Linear Prediction")
Array Array
0 Response to marginsplot title (and text box) centered on graph region, not plot region
Post a Comment