You are on page 1of 7

Final Exam, Econometrics Ph.D.

, January 2013
Exam Solutions Question 1 a)
. gen time=yq(year,qtr) . format time %tq . tsset time time variable: time, 1950q1 to 2000q4 delta: 1 quarter . regress m1 realgdp tbilrate cpi Source | SS df MS -------------+-----------------------------Model | 25912265.2 3 8637421.74 Residual | 356550.51 200 1782.75255 -------------+-----------------------------Total | 26268815.7 203 129403.033 Number of obs F( 3, 200) Prob > F R-squared Adj R-squared Root MSE = 204 = 4844.99 = 0.0000 = 0.9864 = 0.9862 = 42.223

-----------------------------------------------------------------------------m1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------realgdp | .0304318 .0070355 4.33 0.000 .0165585 .0443051 tbilrate | -18.03561 1.175798 -15.34 0.000 -20.35417 -15.71706 cpi | 2.080216 .0974255 21.35 0.000 1.888103 2.272329 _cons | -60.36897 11.02226 -5.48 0.000 -82.10373 -38.63422 -----------------------------------------------------------------------------. predict em1, resid . jb6 em1 Jarque-Bera normality test: 75.02 Chi(2) Jarque-Bera test for Ho: normality: (em1)

5.1e-17

b)
. . . . gen gen gen gen lm1=log(m1) lrealgdp=log(realgdp) ltbilrate=log(tbilrate) lcpi=log(cpi)

. regress lm1 lrealgdp ltbilrate lcpi Source | SS df MS -------------+-----------------------------Model | 131.095558 3 43.6985194 Residual | .63881713 200 .003194086 -------------+-----------------------------Total | 131.734375 203 .648937809 Number of obs F( 3, 200) Prob > F R-squared Adj R-squared Root MSE = 204 =13681.07 = 0.0000 = 0.9952 = 0.9951 = .05652

-----------------------------------------------------------------------------lm1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------lrealgdp | .5818528 .03766 15.45 0.000 .5075913 .6561143 ltbilrate | -.1459123 .0095745 -15.24 0.000 -.1647922 -.1270324 lcpi | .8434147 .024523 34.39 0.000 .7950578 .8917716 _cons | -3.198795 .1866801 -17.14 0.000 -3.566908 -2.830681 ------------------------------------------------------------------------------

. predict elm1, resid . jb6 elm1 Jarque-Bera normality test: .9267 Chi(2) .6292 Jarque-Bera test for Ho: normality: (elm1)

d)
. vce Covariance matrix of coefficients of regress model e(V) | lrealgdp ltbilrate lcpi _cons -------------+-----------------------------------------------lrealgdp | .00141827 ltbilrate | -.00018521 .00009167 lcpi | -.00088318 .00008067 .00060138 _cons | -.00692737 .00098369 .00409877 .03484946 . test lcpi=2*lrealgdp ( 1) - 2*lrealgdp + lcpi = 0 F( 1, 200) = Prob > F = 10.46 0.0014

f) No, the time series does not appear to be stationary. For details, see the lecture notes. Since the data is at the quarterly level, we should perform the ADF tests at least up to the fourth lag. None of these ADF test rejects the null hypothesis of presence of a unit root.
gen time=yq(year,qtr) format time %tq tsset time twoway (tsline tbilrate)

0 1950q1

tbilrate

10

15

1960q1

1970q1

time

1980q1

1990q1

2000q1

. dfuller tbilrate, lags(0) Dickey-Fuller test for unit root Number of obs = 203

---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -2.132 -3.476 -2.883 -2.573 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.2319 . dfuller tbilrate, lags(1) Augmented Dickey-Fuller test for unit root Number of obs = 202

---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -2.538 -3.476 -2.883 -2.573 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.1064 . dfuller tbilrate, lags(4) Augmented Dickey-Fuller test for unit root Number of obs = 199

---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -2.330 -3.477 -2.883 -2.573 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.1624

g) Yes, the first differences appear to be stationary, unconditionally (there appears to be some conditional heteroscedasticity around 1980, though). ADF tests confirm this conclusion.
gen dtbilrate=tbilrate-tbilrate[_n-1] twoway (tsline dtbilrate)

-4 1950q1

-2

dtbilrate 0

1960q1

1970q1

time

1980q1

1990q1

2000q1

. dfuller dtbilrate, lags(0) Dickey-Fuller test for unit root Number of obs = 202

---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -11.463 -3.476 -2.883 -2.573 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.0000 . dfuller dtbilrate, lags(1) Augmented Dickey-Fuller test for unit root Number of obs = 201

---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -11.835 -3.476 -2.883 -2.573 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.0000 . dfuller dtbilrate, lags(4) Augmented Dickey-Fuller test for unit root Number of obs = 198

---------- Interpolated Dickey-Fuller --------Test 1% Critical 5% Critical 10% Critical Statistic Value Value Value -----------------------------------------------------------------------------Z(t) -4.962 -3.477 -2.883 -2.573 -----------------------------------------------------------------------------MacKinnon approximate p-value for Z(t) = 0.0000

Question 2 a) No, the explanatory variables are not jointly significant at the 5% level. Their level of joint significance is 16.9% (see the p-value of the LR 2-statistic).
probit grade gpa tuce psi mfx

b) Since our dependent variable is binary, we are estimating the impact the variable tuce has on the probability that an individual passes an end-of-term examination in economics. This impact can be seen from the marginal effect; if tuce increases by 1 unit the probability that an individual passes the end-of-term examination in economics increases on average, ceteris paribus, by 2.789 percentage points, given average values of gpa and psi. c) 27 observations in which grade = 1 are correctly predicted. However, no observation in which grade = 0 is correctly predicted.
predict pgrade gen prgrade=round(pgrade) tab grade prgrade

Alternatively:
estat clas

d) Because our sample is unbalanced it has many more 1s than 0s the usual threshold value of 0.5 is not optimal. We can try to improve the results by replacing this nave predictor with a new threshold, which equals the proportion of 1s in the sample; 28/32 = 0.875.
gen psgrade=0 replace psgrade=1 if pgrade>0.875 tab grade psgrade

Alternatively:
estat clas, cutoff(0.875)

Only for observations for which P(grade = 1) > 0.875, the predicted value of grade will be set to 1. Using this procedure, we obtain:
| psgrade grade | 0 1 | Total -----------+----------------------+---------0 | 3 1 | 4 1 | 7 21 | 28 -----------+----------------------+---------Total | 10 22 | 32

With this procedure we increased the number of correct classifications of observations that have grade = 0, i.e. we correctly predicted 3 observations out of 4. However, this comes at a cost of decreasing the number of times we correctly predicted the observations that have grade = 1. In fact, the prediction power of our model decreased as with this procedure we only predict 24 out of 32 observations correctly (75%) in comparison with the previous procedure where 27 out of 32 observations (96.4%) were correctly predicted. However, in relative terms, the increase in the number of correct classifications of observations that have grade = 0 (75 percentage points) is greater than the decrease in the number of correct classifications of observations that have grade = 1 (21.4 percentage points). e) The probit model is of the following form: y* = X + e, where y = 1 when y* > 0. The likelihood function is the joint probability of: P (y = 1) = P (X + e > 0) = P (e > X) = (e < X) = P (e < X) = (X) and P (y = 0) = P (X + e < 0) = P (e < X) = (e > X) = P (e > X) = 1 (X). In the probit model, we estimate the ratio of / , not itself, because it only matters whether X + e is > 0 or < 0. The scale () is not important. Thus the log-likelihood function is:
T T ln L = ln 1 ( xi ) + ln ( xi ) . yi = 0 yi =1

Now, for

ln 1 ( x ) we can show:
T yi = 0 i

1 ( T xi ) < 0 and since 0 < 1 ( T xi ) < 1 , it holds that ln while for

ln 1 ( x ) < 0 ,
T yi = 0 i

ln ( x ) we can show:
T yi =1 i

( T xi ) < 0 and since 0 < ( T xi ) < 1 , it holds that ln


Question 3

( x ) < 0 . ln
T yi =1 i

a) Because the variable z is constant for all observations on a particular firm, when we estimate a fixed effects model, z is differenced out in the preliminary step that removes the within-firm means from all variables. This means the fixed effects estimator yields an estimate of the coefficient on x but not the coefficient on z.

To conduct a Hausman test, we need to compare fixed effects coefficients with random effects coefficients. In circumstances like this, we construct the test statistic using coefficients common to the two estimators. This means that even though we estimate the random effects model by regressing y on both x and z, the test statistic uses only the coefficient on x. We should not change the model by dropping z from the equation. The hypothesis we want to test is whether the error term in the random effects model is independent of the regressors x and z. If we drop z from the equation, we are testing a different hypothesis, whether the error term in the modified equation is independent of x. This is not the same hypothesis, because the error term in the modified equation will include the effect of z on y. That is, if the original model is: y = a + b1x + b2z + e, we want to test the hypothesis E(e | x, z) = 0. If we drop z from the model, the new error term is e + b2z. A Hausman test based on this model will test the hypothesis E(e + b2z | x) = 0, which is not the same hypothesis. In particular, if x and z are correlated, E(e + b2z | x) will not equal zero, even if E(e | x, z) = 0.
b) The following commands and output show how the test statistic should be calculated. First, in order to avoid collinearity, we regress y on x using the fixed effects estimator and save the results (we are interested in the coefficient and standard error).
iis firmid xtreg y x z, fe estimates store fixed

Now we run the random effects model and save the results.

xtreg y x z, re estimates store random

The parameter common to both models is used for the Hausman test. This parameter is the coefficient on x. Thus, we perform the Hausman test.
hausman fixed random

Note that something unexpected has happened. Namely, the test statistic is negative (6.18). Also, it has no standard error or p-value attached, thus no direct inference is possible. If we check the regression output, we can see the reason; the standard error of the fixed effects estimate is smaller than the standard error of the random effects model. This is somewhat surprising, for the random effects estimator is supposed to be more efficient. Indeed, the purpose of the Hausman test is to determine whether we can use the random effects estimator because it is more efficient. Why is the fixed effects estimator more efficient in this case? This situation is similar to the example of the bivariate probit model. The bivariate probit model that estimates two probit models jointly is more efficient than estimating two probit models separately if the errors are correlated and the correlation coefficient is known. However, if the correlation coefficient must be estimated (as is usually the case), the bivariate probit model can actually be less efficient due to the need to estimate the additional parameter. In the present problem, the random effects model has to estimate an additional parameter; the coefficient on the variable z. In this example, because z and x are correlated, there is a loss of precision in the estimate of the coefficient on x when z is also included in the model.
c) As we have already established, no direct conclusion is possible based solely on the value of the Hausman test statistic in this case. So, which estimator should we choose?

The fixed effects estimator is the safer choice, because it removes the influence of the fixed effect before estimating the coefficient on x. As we have seen, in this example the fixed effects estimate of the coefficient on x also has a lower standard error. Therefore, there is no reason to prefer the random effects estimator.

You might also like