* Finding Median Hourly Wages * * Keywords: * regression, ols, dummy, anova, hourly, wages * * Description: * We illustrate how to estimate a Model for Hourly Wages and find * Median Hourly Wages for male and female workers * * Author(s): * Skif Pankov * * Source: * Damodar N. Gujarati and Dawn C. Porter, Basic Econometrics - 5th Edition * McGraw-Hill International Edition, Chapter 9, Example 9.8 (page 298) * sample 1 528 * Reading the datafile and naming variables read(data_9.5.shd) wage educ fem nwh * Generating a log of wages genr lnw = log(wage) * Running an OLS regression of wage on fem dummy and saving estimated coefficients in a variable beta ols lnw fem / anova coef = beta * Generating an estimated median hourly earning of a male worker and * outputting it gen1 mwm = exp(beta:2) print mwm * Generating an estimated median hourly earning of a female worker and * outputting it gen1 mwf = exp(beta:2 + beta:1) print mwf stop