# Log-Linear Models with Indicators

In this example an indicator variable is included in a log-linear model. It is based on a wage example used earlier. ln(wage) = ві + P2educ + 5 female + e

Estimation of this model by least squares allows one to compute percentage differences between the wages of females and males. As discussed in POE4, the algebra suggests that the percentage difference is

100(e<5-1)% (7.4)

The model is estimated and the computation carried out in the following script.

1 open "@gretldirdatapoecps4_small. gdt"

2 logs wage

3 ols l_wage const educ female

4 scalar differential = 100*(exp(\$coeff(female))-1)

The natural logarithm of wage is taken in line 2. Then the model is estimated an the percentage difference computes.

OLS, using observations 1-1000
Dependent variable: Lwage

 Coefficient Std. Error t-ratio p-value const 1.6539 0.0844 19.60 1.3e-072 educ 0.0962 0.0060 15.94 3.76e-051 female 0.2432 0.0327 7.43 2.31e-013

Sum squared resid 262.2387 S. E. of regression 0.512862 R2 0.221337 Adjusted R2 0.219775

F(2,997) 141.7000 P-value(F) 6.88e-55

The computed difference is -21.5896, suggesting that females earn about 21.59% less than males who have comparable levels of education.