* get -lean- scheme * net install "http://www.stata-journal.com/software/sj4-3/gr0002_3", replace set scheme lean1 sysuse auto, clear reg price c.mpg##c.weight##c.weight i.foreign qui sum mpg if e(sample) local m = r(mean) local sd = r(sd) preserve qui replace foreign = 0 forvalues i = -2/2 { qui replace mpg = `m' + `i'*`sd' local j = `i' + 2 qui predict yhat`j' } format yhat* %8.0gc sort weight twoway line yhat0 yhat1 yhat2 yhat3 yhat4 weight, /// ytitle("predicted price (US {c S|})") /// lpattern(solid solid solid solid solid) /// lcolor(gs13 gs10 gs7 gs4 gs1) /// legend( order( - "mpg" /// 1 "mean - 2*sd" /// 2 "mean - 1*sd" /// 3 "mean" /// 4 "mean + 1*sd" /// 5 "mean + 2*sd" )) restore