Professional Documents
Culture Documents
Alfonso
c Miranda (p. 1 of 33)
General framework
We have a random sample for the response varible yi and the con-
trol variables (including the constant) xi = (x1i , . . . , xKi ), with
i = 1 . . . N. For each observation the population equation of in-
terest is:
Alfonso
c Miranda (p. 2 of 33)
Consistency of the OLS estimator
The least-squares estimator is consistent under the following two key
key conditions:
E (x0 u) = 0, (OLS.1a)
Alfonso
c Miranda (p. 4 of 33)
y = xβ + u (3)
0 0 0
x y = x xβ + x u (4)
0 0 0
E (x y ) = E (x x)β + E (x u) (5)
Note that the linear model can be written in full matrix notation as:
y = E [y|X] + u (7)
y = Xβ + u (8)
Alfonso
c Miranda (p. 5 of 33)
Then, the OLS estimator can be written as
b = (X0 X)−1 X0 y
β (9)
The analogy principle (see Goldberger (1968) and Manski (1988)) sug-
gest to substitute sample moment conditions for population moment
conditions to obtain estimators. This lead us to the method of mo-
ments that substitutes the corresponding sample averages for E (x0 x)
and E (x0 y ), respectively.
XN
!−1
XN
!
β
b= N −1 x0i xi N −1 x0i yi
i=1 i=1
N
!−1 N
!
X X
−1
β
b= N x0i xi N −1
x0i (xi β + ui )
i=1 i=1
N
!−1 N
!
X X
−1
β
b =β+ N x0i xi N −1
x0i ui
i=1 i=1
−1
x0i xi = plimN −1 X0 X.
P
Define A = plimN i
Alfonso
c Miranda (p. 6 of 33)
Then,
plimβb = β + A−1 · 0
plimβb = β. (10)
Alfonso
c Miranda (p. 7 of 33)
Asymptotic inference with OLS
From our previous discussion we have
N
!−1 N
!
√ X X
N βb −β = N −1 x0i xi N −1/2 x0i ui
i=1 i=1
Alfonso
c Miranda (p. 8 of 33)
We also know that
N
!−1
X
N −1 x0i xi − A−1 = op (1)
i=1
Alfonso
c Miranda (p. 9 of 33)
In particular we have that:
N
!
d
X
0 −1/2
W N x0i ui → N (0, W0 BW)
i=1
Alfonso
c Miranda (p. 10 of 33)
This result saya that we can treat β
b as asymptotically Normal with
0 −1
mean β and variance σ [E (x x)] . A consistent estimator for σ 2 is
2
N
ûi2
P
i=1
σ̂ 2 =
N −K
N
If we substitute E (x0 x) by the sample average N −1 x0i xi =
P
i=1
N −1 (X0 X) we can write:
b∼a
β N (β, V̂).
where
b = σ̂ 2 (X0 X)−1
V̂ = Avar(β)
is the asymptotic estimator of the variance.
Alfonso
c Miranda (p. 11 of 33)
For the j-th coefficient the asymptotic standard error is definied as:
1/2
v̂jj
se(βbj ) =
N
Alfonso
c Miranda (p. 12 of 33)
In short. . .
I standard errors and confidence intervals.
I t tests
I F tests
I χ2 tests
are all asymptotically valid under OLS.1-OLS.3. Hence, we can do
hypothesis tests as usual in the basis that
βbj − βj
∼ tN−K
se(βbj )
Remember, you can use the p-value = P(|T | > |t|) for inference.
A p-value < 0.05 (p-value < 0.01) is evidence for rejecting H0 at a
significance level of 5% (1%).
Alfonso
c Miranda (p. 13 of 33)
Alfonso
c Miranda (p. 14 of 33)
Heteroskedasticity robust inference
Violations to OLS.1 leads to an inconsistent OLS estimator. This
is the worst problem the econometrician can ever face, as if OLS.1
fails we need to solve the endogeneity problem [i.e. E (u|x) 6= 0]
using some advanced method. If OLS.3 fails standard errors will
be inflated or deflated and inference will be invalid under the
assumption of homoskedasticity. This is a less troublesome issue as
we can use a heteroskedasticity robust estimator of the covariance
matrix. In general we have that:
Alfonso
c Miranda (p. 15 of 33)
b = (X0 X)−1 X0 Ω̂X(X0 X)−1
Avar(β)
where a consistent estimator for Ω = E (uu0 ) is Ω̂ = Diag[ûi2 ] with
ûi = yi − xi β.
Alfonso
c Miranda (p. 16 of 33)
The Delta method
Suppose that
√
d
N βb −β → N(0, V)
Alfonso
c Miranda (p. 18 of 33)
Example: Delta method
Alfonso
c Miranda (p. 19 of 33)
i
b = exp(β̂1 ) 0 1 0.5 exp(β̂1 ) 0
h
Avar exp(β)
0 exp(β̂2 ) 0.5 1 0 exp(β̂2 )
2
exp(β̂1 ) 0.5 exp(β̂1 ) exp(β̂2 )
=
0.5 exp(β̂1 ) exp(β̂2 ) exp(β̂2 )2
Alfonso
c Miranda (p. 20 of 33)
Three equivalent ways of doing asymptotic inference
The objective is to perform hypothesis tests of the form
H0: c(β) = 0 vs H1: c(β) 6= 0
Alfonso
c Miranda (p. 22 of 33)
I Wald test. If the restriction is valid, then c(β MLE ) most be
close zero. Hence, we can base the hypothesis test on
c(β̂ MLE ) and reject H0 if the value that we get is significantly
different from zero. If c(β) = Rβ − r
0 −1
a
W = Rβ̂ − r RV̂R Rβ̂ − r ∼ χ2Q .
Alfonso
c Miranda (p. 23 of 33)
I Lagrange multiplier test (‘score’ test). This test is based on
the restricted model. The idea is that the likelihood function
is maximised under the constraint c(β) = 0
Alfonso
c Miranda (p. 24 of 33)
In particular λ will be small. This can be tested with
H0: λ = 0, which leads us to the Lagrange multiplier test. An
equivalent form makes use of the fact that
∂ ln L
s(β̂ R ) = = −C(β)0 λ
∂β
y = x1 β 1 + x2 β 2 + u
Alfonso
c Miranda (p. 27 of 33)
An example
We have data on medical expenditures of individuals 65 and over
who qualify to Medicare (USA) (see Cameron and Trivedi (2009)
Stata book, page 73). Original data comes from the Medical
Expenditure Panel Survey (MEPS). Medicare does not cover all
medical expenses and about 1/2 of eligible individuals purchase
suplementary insurance.
. use mus03data
. describe totexp ltotexp posexp suppins phylim actlim totchr age female income
Alfonso
c Miranda (p. 28 of 33)
We want to test
------------------------------------------------------------------------------
ltotexp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
suppins | .2556428 .0462264 5.53 0.000 .1650034 .3462821
phylim | .3020598 .0569709 5.30 0.000 .190353 .4137666
actlim | .3560054 .0621118 5.73 0.000 .2342185 .4777923
totchr | .3758201 .0184227 20.40 0.000 .3396974 .4119429
age | .0038016 .0036561 1.04 0.299 -.0033672 .0109705
female | -.0843275 .0455442 -1.85 0.064 -.1736292 .0049741
income | .0025498 .0010194 2.50 0.012 .000551 .0045486
_cons | 6.703737 .27676 24.22 0.000 6.161075 7.2464
------------------------------------------------------------------------------
. estimates store UM
Alfonso
c Miranda (p. 29 of 33)
/* LR test */
. regress ltotexp suppins phylim age female income
------------------------------------------------------------------------------
ltotexp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
suppins | .2762374 .0499206 5.53 0.000 .1783547 .3741202
phylim | .8048815 .0501609 16.05 0.000 .7065276 .9032353
age | .0061206 .0039343 1.56 0.120 -.0015936 .0138349
female | -.0704256 .0492262 -1.43 0.153 -.1669468 .0260956
income | .0010507 .0010982 0.96 0.339 -.0011027 .0032041
_cons | 7.108237 .2969732 23.94 0.000 6.525942 7.690533
------------------------------------------------------------------------------
. estimates store RM
. lrtest UM RM
Alfonso
c Miranda (p. 30 of 33)
/* Wald test */
. estimates restore UM
(results UM are active now)
. regress
------------------------------------------------------------------------------
ltotexp | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
suppins | .2556428 .0462264 5.53 0.000 .1650034 .3462821
phylim | .3020598 .0569709 5.30 0.000 .190353 .4137666
actlim | .3560054 .0621118 5.73 0.000 .2342185 .4777923
totchr | .3758201 .0184227 20.40 0.000 .3396974 .4119429
age | .0038016 .0036561 1.04 0.299 -.0033672 .0109705
female | -.0843275 .0455442 -1.85 0.064 -.1736292 .0049741
income | .0025498 .0010194 2.50 0.012 .000551 .0045486
_cons | 6.703737 .27676 24.22 0.000 6.161075 7.2464
------------------------------------------------------------------------------
. test actlim=totchr=0
( 1) actlim - totchr = 0
( 2) actlim = 0
F( 2, 2947) = 251.45
Prob > F = 0.0000
Alfonso
c Miranda (p. 31 of 33)
/* Score test */
. estimates restore RM
. predict scores, score
. testomit (mean: actlim totchr), score(scores)
Term | score df p
---------------------+----------------------
mean |
actlim (as factor) | 71.72 1 0.0000
totchr | 459.94 1 0.0000
---------------------+----------------------
simultaneous test | 487.55 2 0.0000
---------------------+----------------------
Nonlinear tests
. estimates restore UM
(results UM are active now)
( 1) product = 0
F( 1, 2947) = 33.39
Prob > F = 0.0000
Alfonso
c Miranda (p. 32 of 33)
References
I Eicker, Friedhelm (1967), ”Limit Theorems for Regression with Unequal and
Dependent Errors”, Proceedings of the Fifth Berkeley Symposium on
Mathematical Statistics and Probability, pp. 59–82.
I Goldberger, A.S. (1968). Topics in Regression Analysis. New-York: Macmillan.
I Huber, Peter J. (1967), ”The behavior of maximum likelihood estimates under
nonstandard conditions”, Proceedings of the Fifth Berkeley Symposium on
Mathematical Statistics and Probability, pp. 221–233.
I Huber, P. J. (1981) Robust Statistics. New York: John Wiley and Sons.
I MacKinnon, James G.; White, Halbert (1985), ”Some
Heteroskedastic-Consistent Covariance Matrix Estimators with Improved Finite
Sample Properties”, Journal of Econometrics 29: 305–325.
I Manski, C. (1988). Analog Estimation Methods in Econometrics. New-York:
Chapman and Hall.
I White, Halbert (1980). ”A heteroskedasticity-consistent covariance matrix
estimator and a direct test for heteroskedasticity”. Econometrica 48 (4):
817–838.
Alfonso
c Miranda (p. 33 of 33)