* * Example 18.2 * J. Wooldridge, Econometrics of Cross Section and Panel Data * * Note: The sample data files include all required data transformations. * However, in many cases we show how these data transformations would * be created in RATS from the basic data, as this is something you will * need to know how to do in practice. * * open data jtrain2.raw data(format=free,org=columns) 1 445 train age educ black hisp married nodegree mosinex $ re74 re75 re78 unem74 unem75 unem78 lre74 lre75 lre78 agesq mostrn * * Do first stage probit of training on the explanatory variables. Get the * predicted probabilities. * ddv(dist=probit) train # constant re74 re75 age agesq nodegree married black hisp prj(cdf=propensity) * * Regress real earnings on intercept, train and the propensity variable. * linreg re78 # constant train propensity * * For comparison, run a linreg with the dummy and all the explanatory variables. * linreg re78 # constant train re74 re75 age agesq nodegree married black hisp * * And just the dummies. * linreg re78 # constant train * * Generate the interaction term for regression 18.24. The regression won't match * exactly, because this doesn't round the mean to .416. * stats(noprint) propensity set wp = train*(propensity-%mean) * linreg re78 # constant train propensity wp