Using gret l for Principles of Econometrics, 4th Edition

School Fixed Effects

It may be that assignment to treatment groups is related to one or more of the observable characteristics (school size or teacher experience in this case). One way to control for these omitted effects is to used fixed effects estimation. This is taken up in more detail later. Here we introduce it to show off a useful gretl function called dummify.

The dummify command creates dummy variables for each distinct value present in a series, x. In order for it to work, you must first tell gretl that x is in fact a discrete variable. We want to create a set of indicator variables, one for each school in the dataset. First declare the schid variable to be discrete and then dummify it.

Here is the code and another model table that mimics Table 7.7 in POE4.

1 discrete schid

2 list d = dummify(schid)

3 ols totalscore x1 —quiet

4 scalar sser = $ess

5 scalar r_df = $df

6 modeltab add

7 ols totalscore x2 —quiet

8 modeltab add

9 ols totalscore x1 d —quiet

10 scalar sseu = $ess

11 scalar u_df = $df

12 modeltab add

13 ols totalscore x2 d --quiet

14 modeltab add

15 modeltab show

16 modeltab free

The discrete function in line 1 makes schid into a discrete variable. The next line creates a list that includes each of the variables created by dummify(schid). Then, all you have to do is add it to the variable list that includes the fixed effects. Gretl smartly avoids the dummy variable trap by dropping one of the indicator variables from the regression.

Here is what you get with the indicator coefficients suppressed:

OLS estimates

Dependent variable: totalscore

(1)

(2)

(3)

(4)

const

918.0**

907.6**

838.8**

830.8*

(1.667)

(2.542)

(11.56)

(11.70)

small

Подпись: 13.90** 13.98** 16.00** 16.07** (2.447) (2.437) (2.223) (2.218) 1.156** 0.9132* (0.2123) (0.2256) Подпись: noПодпись: yes yestchexper

Подпись: n R2 I Подпись: 3743 0.0083 2.145e+004 Подпись: 3743 0.0158 -2.144e+004 Подпись: 3743 0.2213 -2.096e+004 Подпись: 3743 0.2245 -2.095e+004

School Effects no

Standard errors in parentheses * indicates significance at the 10 percent level ** indicates significance at the 5 percent level

The estimated slopes in columns (3) and (4) match those in POE4. The intercepts are different only because a different reference group was used. The substance of the results is unaffected.

Testing the null hypothesis that the fixed effects are zero is very simple. Compare the restricted and unrestricted sum of squared errors using a F-statistic. The restricted sum of squared errors is saved for model (1) and the unrestricted for model (3). The statistic is computed using

1 scalar J = r_df-u_df

2 scalar fstat = ((sser - sseu)/J)/(sseu/u_df)

3 pvalue f J u_df fstat and the result is:

Generated scalar J = 78 Generated scalar fstat = 14.1177

F(78, 3663): area to the right of 14.1177 = 1.70964e-154 (to the left: 1)

Notice how the difference in the number of degrees of freedom reveals how many restrictions are imposed on the model. Given the number of times we've used this computation, it may pay to write a gretl function to automate it.

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

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 Александр
- телефон для консультаций и заказов спец.оборудования, дробилок, уловителей, дражираторов, гереторных насосов и инженерных решений.