/* Using the adjust postestimation command. After an estimation command), adjust provides adjusted predictions of xb (the means in a linear-regression setting). The estimate is computed for each level of the by() variables, */ reg realrinc white if year==2006 tabstat realrinc if year==2006, by(white) format(%9.1fc) adjust, by(white) format(%9.1fc) /* Show means for race categories */ /* Let's add in a continuois variable */ reg realrinc white educ if year==2006 adjust, by(white) format(%9.1fc) /* Show means for race categories */ adjust educ, by(white) format(%9.1fc) /* Show means for race categories at average education */ adjust educ=20, by(white) format(%9.1fc) /* Show means for race categories at 20 yrs of education */ adjust educ=12, by(white) format(%9.1fc) /* Show means for race categories at 10 yrs of education */ adjust, by(white men) format(%9.1fc) /* Show means for race and sex categories */ /* And an interaction term */ reg realrinc white educ race_ed if year==2006 adjust, by(white) format(%9.1fc) /* Show means for race categories */