* open data use cps4_small, clear describe summarize * estimate model with black-female interaction reg wage educ i.black##i.female * estimate wage difference between black-female and white-male lincom 1.black + 1.female + 1.black#1.female * F-test of joint significance test 1.female 1.black 1.black#1.female * Average marginal effects margins, dydx(*) quietly summarize black scalar ablack = r(mean) lincom 1.female + 1.black#1.female*ablack * Chapter 7.2.2 Add regional indicators reg wage educ i.black##i.female i.south i.midwest i.west test 1.south 1.midwest 1.west di "F(3,992,.95) = " invFtail(3,992,.05) di "F(3,992,.90) = " invFtail(3,992,.10) * Chapter 7.2.3 Testing the equivalence of two regressions reg wage i.south##(c.educ i.black##i.female) test 1.south 1.south#c.educ 1.south#1.black 1.south#1.female /// 1.south#1.black#1.female * constructing estimates in separate regressions from fully interacted model lincom 1.black + 1.black#1.south lincom 1.female + 1.female#1.south * Estimate separate regressions bysort south: reg wage educ i.black##i.female