Econ-T2 Eng
Econ-T2 Eng
Inference
¶y
= bj
¶x j
How to interpret
Sx j
ˆ
bj*
= bˆ j
Sy
y i = b1 + b 2 x i, 2 + ! + b k x i,k + e i
Y = Xb + e
Linearity refers to the form in which parameters and
disturbance are introduced into the equation but not
necessarily refers to the relationship between the
variables (Xj exponentiation)
Exemples of parameters’ linearity
y = b0 + b1x + e
y = b 0 + b1·(1 / x) + e Reciprocate
y = b0 + b1x + b2 x 2 + e
y = b 0 + b1 x1 + b 2 x2 + b3 x1 x2 + e
K
y = eb1 x b22 x b3 3 ···x bkk e e = eb1 Õ
k =2
x bkk e e
ln y = b1 + b 2 ln x 2 + b3 ln x 3 +···+b k ln x k + e
¶y y ¶ ln y
= = bj Constant elasticity, does not change
¶x j x j ¶ ln x j when x varies
¶y y x jb j
= ¹ b j This is not the case in the linear model
¶x j x j x ' b + e since we might expect increasing returns
Logistic model
1
yt =
1+ e ( - x 't b + d t + e t )
yt Transformed in logs
log it ( y t ) = ln = x 't b + d t + e t
1 - yt
Functional forms & parameters’ interpretation
level-level y x Dy = b1Dx
%Dy = b1 %Dx
log( y) = 256 + 0.25 log( x)
How to choose functional form
l Theoretical model
e i = y - E( y / X = x i )
æ1 x11 ! x k1 ö
ç ÷
Y = Xb + e X = ç" " ÷
ç1 x ! x ÷
è 1n kn ø
é y1 ù é b1 ù é e1 ù
êy ú êb ú êe ú
Y = ê 2ú b=ê 2ú e = ê 2ú
ê! ú ê ! ú ê!ú
ê ú ê ú ê ú
ëyn û ëb K û ëe n û
Basic hypotheses in RM
General hypotheses:
[ (
COV(ei , e j / X) = E (ei - E(ei )) e j - E(e j ) )]
when E (e i / X ) = 0
COV (e i , e j / X ) = E (e i ·e j ) = 0
Both assumptions
ei ~ N(0, se2 ·I n )
Hypotheses with regards exogenous variables
y ei = yi - ŷi = yi - bˆ 0 - bˆ 1·x i
yi
û i
ŷi
xi x
OLS methodology
We select that regression line that minimize errors, that is, the
difference between the fitted value and the real value of the
endogenous variable.
Be aware that Wooldridge use SSE for explained and SSR for residuals
Goal
å( )
n
å
2
min e i2 = y i - bˆ 0 - bˆ 1 ·x i
i =1
Simple RM - OLS
ï
å
ì ¶ e i2
å
= -2 ( y i - bˆ 0 - bˆ 1 ·x i ) = 0 åy i = nbˆ 0 +bˆ 1 åx i
ï ¶bˆ 0
í
ï ¶å e 2
å ˆ - bˆ ·x ) = 0
å x i yi = bˆ 0 å x i + bˆ 1 å
i
ï ¶bˆ = -2 x i ( y i - b 0 1 i x i2
î 1
å yi nbˆ 0 ˆ å xi y = bˆ 0 + bˆ 1 ·x
= + b1
n n n
bˆ 0 = y - bˆ 1 ·x
Point estimate of the parameter
n åy i
bˆ 1 =
å x åx y
i i i
=
n å x y - å x å y = å x y - nxy
i i i i i i
n åx i
n å x - (å x )
2
i i å x - nx
2 2
i
2
åx åx i
2
i
bˆ 1 =
(å x y n ) - xy S
i i
=
xy
= rxy
Sy
(å x n )- x S
2
i
2 2
x Sx
Matrix notation
¶SSE ( bˆ )
= -2 X ' y + 2 X ' Xbˆ = 0
¶bˆ
OLS - Algebra
¶ 2 SSE ( bˆ )
= 2X ' X
¶bˆ¶bˆ '
OLS estimators properties
l Linearity
l Unbiased
l Efficiency
l Consistent
(P1) Linearity
Individually
bˆ ~ N(E[bˆ ], V[bˆ ])
bˆ j ~ N(E[bˆ j ], V[bˆ j ])
(P4) Consistent
ˆ ˆ ˆ
RMSE ( b ) = V ( b ) + [bias ( b )] 2
ˆ ˆ
RMSE(b ) = V (b ) = s e ( X ' X )
2 -1 Multiply and divide by n,
assuming X’X/n exists and it is
finite but n®¥
[ ]
lim n®¥ EQM ( bˆ ) = lim n®¥ V ( bˆ ) = lim n®¥ s e2 ( X ' X ) -1 =
és e2 æ X ' X ö -1 ù
= lim n®¥ ê ç ÷ ú=0
êë n è n ø úû
OLS estimators
ˆb ~ N[b, s 2 (X' X) -1 ]
e
Individually
bˆ j - b j
bˆ j ~ N(b j , sb2ˆ ) "j = 1,..., k z= ~ N(0,1)
j sb j
Disturbance variance or error variance(s e2 )
e' e SSE
se =
ˆ 2
= ~ c n-k
2
n-k n-k
Now, the variances & covariances can be estimated
bˆ j - b j
bˆ j ~ N(b j , se2a jj ) ~ N(0,1) ~ ?
sˆ b j
sˆ b2 = sˆ e2 (X' X) -1
( bˆ j - b j )· åx 2
i s
=
( bˆ j - b j )· åa jj s
=
( bˆ j - b j )· åa jj s
~
N (0,1)
= tn-k
S s
2 2
S (n - k ) (s (n - k ))
2 2
e' e (s (n - k ))
2
c 2
n-k n-k
Confidence intervals for bj
bˆ j - b j
~ t n -k [ ]
P - ta 2 £ t £ ta 2 =1- a
sˆ b j
é bˆ j - b j ù
P ê- t a 2 £ £ ta 2 ú = 1- a
ê Sbˆ ú
ë j û
[bˆ ± t
j a / 2 ·Sbˆ j ]
Confidence interval for s2
[ 2 2 2
]
P c 1-a 2 £ c £ c a 2 = 1 - a
é (n - k )sˆ 2 (n - k )sˆ 2ù
ê 2 <s < 2
2
ú
êë ca 2,n - k c1-a 2,n - k úû
Maximum likelyhood estimation (ML)
1 ì 1 2ü
f (e i ) = exp í- 2 e i ý
2ps e2 î 2s e þ
Likelyhood function
-n / 2 ì 1 ü
L( y; b, se2 ) = (2p) (se2 ) - n / 2 exp í- 2 ( y - Xb)' ( y - Xb)ý
î 2s e þ
n n n n
SST = å ( yi - y ) 2 = å yi2 - ny 2 SSR = å
i =1
2
( yˆ i - y ) = å
i =1
yˆ i2 - ny 2
i =1 i =1
RM should contain an
y' y - ny 2 = ŷ' ŷ - ny 2 + e' e
intercept
n
n n
SSR = å
i =1
( yˆ i - y ) 2 = å
i =1
yˆ i2 - ny 2
2 SSE e' e
R =1- =1-
å(y
2
SST - y)
i
Cross-section data R2=0.5 is quite good. For time series the value is higher.
Using microdata 0.2 is fair enough
To compare we need same sample size
It takes into account the degrees of freedom, that is, the number
of explanatory variables. It is called adjusted R2
2 n -1
R =1- (1 - R 2 )
n-k
(å (y - y )(ŷ - ŷ ))
i i
2
é s (k - 3) 2 ù 2
JB = n ê + ú ~ ck
ë6 24 û
y = Xb + e = X1b1 + X 2b 2 + e
Simple RM versus RM
~ ~ ~
simple RM y = b0 + b1x1
RM ˆ +b
ŷ = b ˆ x +b
ˆ x
0 1 1 2 2
~ ˆ
b1 ¹ b 1
Exception:
• b̂ 2 = 0 (no partial effect)
• x1 & x2 uncorrelated
Partial regression coefficients
bˆ 1 =
å r̂ y
i1 i
å r̂ 2
i1