Lesson 2 - Main Estimation Methods For Panel Data-PTBNgoc

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Pham Thi Bich Ngoc, Ph.D.

(University of Kiel, Germany)


FEC/Hoa Sen University
ngoc.phamthibich@hoasen.edu.vn

UNIVERSITY OF ECONOMICS HOCHIMINHCITY, August 2014

Aug14 - Dr. Pham Thi Bich Ngoc 1


Multicollinearity occurs when two or more
independent variables in a regression model
are highly correlated to each other
Standard error of the OLS parameter estimate
will be higher if the corresponding
independent variable is more highly correlated
to the other independent variables in the
model

Aug14 - Dr. Pham Thi Bich Ngoc 2


Perfect multicollinearity occurs when there is a
perfect linear correlation between two or more
independent variables

When independent variable takes a constant


value in all observations

Aug14 - Dr. Pham Thi Bich Ngoc 3


Edited by Foxit Reader
Copyright(C) by Foxit Software Company,2005-2008
For Evaluation Only.

The symptoms of a multicollinearity problem

1. independent variable(s) considered


critical in explaining the models
dependent variable are not
statistically significant according to
the tests

Aug14 - Dr. Pham Thi Bich Ngoc 4


Edited by Foxit Reader
Copyright(C) by Foxit Software Company,2005-2008
For Evaluation Only.

2. High R2, highly significant F-test,


but few or no statistically significant
t tests

3. Parameter estimates drastically


change values and become
statistically significant when
excluding some independent
variables from the regression

Aug14 - Dr. Pham Thi Bich Ngoc 5


A simple test for multicollinearity is to
conduct artificial regressions between each
independent variable (as the dependent
variable) and the remaining independent
variables

Variance Inflation Factors (VIFj) are calculated


as:
1
VIFj


1 R j
2

Aug14 - Dr. Pham Thi Bich Ngoc 6


Edited by Foxit Reader
Copyright(C) by Foxit Software Company,2005-2008
For Evaluation Only.

VIFj = 2, for example, means that variance is


twice what it would be if Xj, was not affected
by multicollinearity

A VIFj>10 is clear evidence that the estimation


of Bj is being affected by multicollinearity

Aug14 - Dr. Pham Thi Bich Ngoc 7


Although it is useful to be aware of the
presence of multicollinearity, it is not easy to
remedy severe (non-perfect) multicollinearity

If possible, adding observations or taking a


new sample might help lessen multicollinearity

Aug14 - Dr. Pham Thi Bich Ngoc 8


Exclude the independent variables that appear
to be causing the problem

Modifying the model specification sometimes


help, for example:

using real instead of nominal economic data

using a reciprocal instead of a polynomial


specification on a given independent variable

Aug14 - Dr. Pham Thi Bich Ngoc 9


Var(u|x) = 2 [MLR.5]
Homoscedasticity assumption: variance is
constant
Recall the assumption of homoskedasticity
implied that conditional on the explanatory
variables, the variance of the unobserved
error, u, was constant
If this is not true, that is if the variance of
u is different for different values of the xs,
then the errors are heteroskedastic

Aug14 - Dr. Pham Thi Bich Ngoc 10


Picture of Heteroskedasticity
f(y|x)

.
. E(y|x) = b0 +
b 1x
.
x1 x2 x3 x

Aug14 - Dr. Pham Thi Bich Ngoc 11


This provides an estimator of the variance of
which is consistent
The square root of this can be used as a
standard error for inference
Typically call these robust or
heteroscedasticity-consistent standard errors
[Or White standard errors or Huber standard
errors]

Aug14 - Dr. Pham Thi Bich Ngoc 12


Important to remember that these robust
standard errors only have asymptotic
justification with small sample sizes t
statistics formed with robust standard errors
will not have a distribution close to the t, and
inferences will not be correct
In Stata, robust standard errors are easily
obtained using the robust option of
regress

Aug14 - Dr. Pham Thi Bich Ngoc 13


(3) Autocorrelation
Autocorrelation occurs in time-series studies
when the errors associated with a given time
period carry over into future time periods.
For example, if we are predicting the growth of
stock dividends, an overestimate in one year is
likely to lead to overestimates in succeeding
years.

Aug14 - Dr. Pham Thi Bich Ngoc 14


Test: Durbin-Watson statistic:

d
(ei ei 1 )
2

, for n and K -1 d.f.


ei 2

Positive Zone of No Autocorrelation Zone of Negative


autocorrelation indecision indecision autocorrelation
|_______________|__________________|_____________|_____________|__________________|___________________|
0 d-lower d-upper 2 4-d-upper 4-d-lower 4

Autocorrelation is clearly evident


Ambiguous cannot rule out autocorrelation
Autocorrelation in not evident

Aug14 - Dr. Pham Thi Bich Ngoc 15


regress lnY to lnK, lnL, lnM, horizontal, Bam, Bch
estat vif

calculates the centered or uncentered variance inflation


factors (VIFs) for the independent variables specified in a
linear regression model.

Aug14 - Dr. Pham Thi Bich Ngoc 16


regress lnY to lnK, lnL, lnM, horizontal, Bam, Bch
estat hettest

the Breusch-Pagan (1979) and Cook-Weisberg (1983) test for


heteroskedasticity
Ho: Constant variance (the variance of the residuals is
homogenous)

Aug14 - Dr. Pham Thi Bich Ngoc 17


regress lnY to lnK, lnL, lnM, horizontal, Bam, Bch

estat bgodfrey Breusch-Godfrey test for higher-


order serial correlation
H0: no serial correlation

estat dwatson Durbin-Watson d statistic to test


for first-order serial correlation
The Durbin-Watson statistic has a range from 0 to
4 with a midpoint of 2.
For panel data:
xtserial varY varX, output

Aug14 - Dr. Pham Thi Bich Ngoc 18


regress lnY to lnK, lnL, lnM, horizontal, Bam, Bch
estat ovtest

Ramsey regression specification-error test for omitted


variables

Ho: model has no omitted variables

Aug14 - Dr. Pham Thi Bich Ngoc 19


xtreg lnY to lnK, lnL, lnM, horizontal, Bam, Bch
Multicollinearity: not problematic
Heteroschedasticity:
xtreg lnY lnK lnL lnM horizontal Bam Bch, robust
Heteroschedasticity + Autocorrelation:
xtreg lnY lnK lnL lnM horizontal Bam Bch, cluster (id)

Aug14 - Dr. Pham Thi Bich Ngoc 20


Pooled OLS
Fixed Effects (FE), Random Effects (RE), and
Hausman test
Two stages Least Square (2SLS)
Generalized Methods of Moments (GMM)

David Roodman, 2009. "How to do xtabond2: An introduction to


difference and system GMM in Stata," Stata Journal, StataCorp LP, vol.
9(1), pages 86-136, March.
David Roodman, 2006. "How to Do xtabond2: An Introduction to
"Difference" and "System" GMM in Stata," Working Papers 103, Center
for Global Development.

Aug14 - Dr. Pham Thi Bich Ngoc 21


Pooled regression by OLS (STATA_xtreg)
Suppose y is firm output and x is a number of employees
We have i = 1n firms and t = 1T time periods (year)
A simple econometric model:

yit a0 a1 xit uit

uit is a random error term: E (uit ) ~ N (0, 2)


Assumptions: intercept and slope coefficients are constant
across time and firms and that the error term captures
differences over time and over firms???

Aug14 - Dr. Pham Thi Bich Ngoc 22


Pooled regression by POLS may result in heterogeneity bias :

Pooled regression:
y
yit=a0+a1xit+uit

True model: Firm 4




True model: Firm 3

True model: Firm 2




True model: Firm 1

Aug14 - Dr. Pham Thi Bich Ngoc 23


Fixed Effects Estimation:
(One Way) Fixed Effects Model:
If each group (firm) to have its own intercept:
yit a0i a1 xit uit
HOW? create a set of dummy (binary) variables, one for
each firm, and include them as regressors.
This form of estimation is also known as Least Squares
Dummy Variables (LSDV).
N
yit a0i Dit a1 xit uit
i 1

STATA: xtreg i.year


Aug14 - Dr. Pham Thi Bich Ngoc 24
(Two Way) Fixed Effects Model:
allow the intercept to vary across the different time periods
(Two Way Fixed Effects):

N T
yit a0i Dit a2iTit a1 xit uit
i 1 t 1

STATA: xtreg i.id i.year

Aug14 - Dr. Pham Thi Bich Ngoc 25


xtset id year

xtreg lnY lnK lnL lnM

xtreg lnY lnK lnL lnM i.year

xtreg lnY lnK lnL lnM i.year i.industry

Aug14 - Dr. Pham Thi Bich Ngoc 26


Fixed Effects/Within:
discards all variation between individuals and uses only
variation over time within an individual

yit yi a0i a0i a1 ( xit xi ) (uit ui )

yit yi a1 ( xit xi ) uit

STATA: xtreg , fe

Aug14 - Dr. Pham Thi Bich Ngoc 27


Random Effects Estimation:
RE >< FE?
FE assumes that each group (firm) has a non-stochastic
group-specific component to y.
RE treats these unobservable effects as being stochastic
(i.e. random).
yit a0 a1 xit vi it
vi , the random error term/ varies between groups but not
within groups.
it is the element of the error which varies over group and
time.

Aug14 - Dr. Pham Thi Bich Ngoc 28


We assume that:
E (v i ) E ( it ) 0
E (v i2 ) v2
E ( it2 ) 2 (both components homoscedastic)
E ( it v j ) 0 i ,t , j (independence of two components)
E ( it js ) 0 if t s or i j (no autocorrelation)
E (v i v j ) 0 if i j (no across group correlation)
E (v i x it ) E ( it x it ) 0 (both independent of regressor)

STATA: xtreg , re

Aug14 - Dr. Pham Thi Bich Ngoc 29


Choosing between Fixed Effects (FE) and Random Effects (RE)
1. With large T and small N there is likely to be little
difference, so FE is preferable as it is easier to compute
2. With large N and small T, estimates can differ significantly.
If the cross-sectional groups are a random sample of the
population RE is preferable. If not the FE is preferable.
3. If the error component, vi , is correlated with x then RE is
biased, but FE is not.
4. For large N and small T and if the assumptions behind RE
hold then RE is more efficient than FE.

Aug14 - Dr. Pham Thi Bich Ngoc 30


Aug14 - Dr. Pham Thi Bich Ngoc 31
Hausman test:
Tests for the statistical significance of the difference
between the coefficient estimates obtained by FE and by
RE, under then null hypothesis that the RE estimates are
efficient and consistent, and FE estimates are inefficient.

STATA: hausman FE RE

(LM test: xttest0 after xtreg..., re)

Aug14 - Dr. Pham Thi Bich Ngoc 32


xtreg lnY lnK lnL lnM
estimates store OLS
xtreg lnY lnK lnL lnM i.year
xtreg lnY lnK lnL lnM , fe
estimates store FE
xtreg lnY lnK lnL lnM , re
estimates store RE
hausman FE RE

Aug14 - Dr. Pham Thi Bich Ngoc 33

You might also like