Using gret l for Principles of Econometrics, 4th Edition

Predictions in the Log-linear Model

In this example, you use the regression to make predictions about the log wage and the level of the wage for a person having 12 years of schooling. The naive prediction of wage merely takes the antilog of the predicted ln(wage). This can be improved upon by using properties of log­normal random variables. It can be shown that if ln(w) N(y.,a2) then E(w) = e^+a2/2 and

var(w) = e2^2 (ef2 — 1).

That means that the corrected prediction is yc = exp(bi + b2x + <t2/2) = e(bl+b2a:)e<j2/2. The script to generate these is given below.

1 open "@gretldirdatapoecps4_small. gdt"

2 logs wage

3 ols l_wage const educ

4 scalar l_wage_12 = $coeff(const)+$coeff(educ)*12

5 scalar nat_pred = exp(l_wage_12)

6 scalar corrected_pred = nat_pred*exp($sigma"2/2)

7 print l_wage_12 nat_pred corrected_pred

The results from the script are

l_wage_12 = 2.6943434

nat_pred = 14.795801

corrected_pred = 16.996428

That means that for a worker with 12 years of schooling the predicted wage is $14.80/hour using the natural predictor and $17.00/hour using the corrected one. In large samples we would expect the corrected predictor to be a bit better. Among the 1000 individuals in the sample, 328 of them have 12 years of schooling. Among those, the average wage is $15.99. Hence the corrected prediction overshoots by about a dollar/hour. Still, it is closer than the uncorrected figure.

To get the average wage for those with 12 years of schooling, we can restrict the sample using the script below:

smpl educ=12 —restrict summary wage smpl full

The syntax is relatively straightforward. The smpl command instructs gretl that something is being done to the sample. The second statement educ=12 is a condition that gretl looks for within the sample. The --restrict option tells gretl what to do for those observations that satisfy the condition. The summary wage statement produces

Подпись: Minimum Maximum 2.50000 72.1300Подпись: Ex. kurtosis 9.08474

Подпись: Mean 15.9933 Std. Dev. 8.84371 Подпись: Median 14.2050 C. V. 0. 552963
Подпись: Skewness 2.31394

Summary Statistics, using the observations 1-328
for the variable wage (328 valid observations)

which shows that the mean for the 328 observations is almost $16.00. The last line smpl full restores the full sample.

Добавить комментарий

Using gret l for Principles of Econometrics, 4th Edition

Simulation

In appendix 10F of POE4, the authors conduct a Monte Carlo experiment comparing the performance of OLS and TSLS. The basic simulation is based on the model y = x …

Hausman Test

The Hausman test probes the consistency of the random effects estimator. The null hypothesis is that these estimates are consistent-that is, that the requirement of orthogonality of the model’s errors …

Time-Varying Volatility and ARCH Models: Introduction to Financial Econometrics

In this chapter we’ll estimate several models in which the variance of the dependent variable changes over time. These are broadly referred to as ARCH (autoregressive conditional heteroskedas - ticity) …

Как с нами связаться:

Украина:
г.Александрия
тел./факс +38 05235  77193 Бухгалтерия

+38 050 457 13 30 — Рашид - продажи новинок
e-mail: msd@msd.com.ua
Схема проезда к производственному офису:
Схема проезда к МСД

Партнеры МСД

Контакты для заказов оборудования:

Внимание! На этом сайте большинство материалов - техническая литература в помощь предпринимателю. Так же большинство производственного оборудования сегодня не актуально. Уточнить можно по почте: Эл. почта: msd@msd.com.ua

+38 050 512 1194 Александр
- телефон для консультаций и заказов спец.оборудования, дробилок, уловителей, дражираторов, гереторных насосов и инженерных решений.