0% found this document useful (0 votes)
26 views18 pages

Panel Class

Panel data contain observations over both individuals and time periods. It has advantages over cross-sectional and time series data as it provides more data points. There are two main approaches to estimating panel data models - fixed effects (FE) which accounts for time-invariant characteristics of individuals, and random effects (RE) which treats these effects as random variables. FE eliminates individual effects while RE accounts for them, so FE is preferred if effects are correlated with other variables. First differencing and FE give similar but not identical results.

Uploaded by

saadmohammadinan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views18 pages

Panel Class

Panel data contain observations over both individuals and time periods. It has advantages over cross-sectional and time series data as it provides more data points. There are two main approaches to estimating panel data models - fixed effects (FE) which accounts for time-invariant characteristics of individuals, and random effects (RE) which treats these effects as random variables. FE eliminates individual effects while RE accounts for them, so FE is preferred if effects are correlated with other variables. First differencing and FE give similar but not identical results.

Uploaded by

saadmohammadinan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Introduction to Panel Data

1
The Data
Cross section consist of obs on multiple units (N)
at one point of time.
Time series consist of obs on one unit over
several point of time(T).
Panel data contain obs over both units and time.
Micro panel if N>=T;
Macro panel if T>N

2
Example

3
Advantages
• More Efficient estimates: usually larger data sets
than TS or CS.
• Reduces Identification problems: (i) complexities can
be modeled easily (ii) provides internal instruments
(iii) unobserved characteristics of individuals can be
accounted for (iv) problems arises in time-series data
can be avoided.

4
Panel Data Model
• yit=ß0+xit’ß+ɛit
• i=1…..N and t=1…..T
• E{ɛit}= 0 and E{xitɛit}=0 then OLS estimator is consistent.
• Unrealistic Assumption: The error terms from different
periods are uncorrelated such that E{ɛitɛis}=0 for t=/s
• Realistic: There exists a time-invariant component in ɛit
that creates a correlation such that ɛit = ɑi + uit
• Var(uit)= σ2u Cov(uit ujs)= 0
• ɑI is unobserved individual heterogeneity and ɑI is
correlated with xitj

5
Fixed Effect
yit=ɑi+xit’ß+uit (i)
• Here ɑi are considered as unknown parametres to be
estimated-it is FE model.
• ɑi captures unobserved time constant factors
affecting yit whereas uit is time varying/idiosyncratic
error.
• Basically we first difference to eliminate ɑI
• For each i, average the eqn over time
yi (bar)=ɑi+xi (bar)ß+ui(bar) (ii)
• If we subtract for each t we get:
yit*=xi*ß+uit* these are time differenced data.
This is within transformation.
6
Fixed Effect
• A pooled OLS that is based on time demeaned
variables is FE estimator/within estimator-utilizes
time variation in y and x within each cross-sectional
obs.

• The between estimator can be obtained as the OLS


estimator on the cross-sectional eqn (ii):
• yi (bar)=ɑi+xi (bar)ß+ui(bar) (ii)

• we use time averages and run a cross sectional


regression. It can be biased when alpha is correlated
with uit.
7
Fixed Effect
• If we use more regressors,
• yit=xit1’ß1+xit2ß2+…..ɑi+uit
• We use time demeaned data…and use pooled OLS.
• Under strict exogeneity assumption, FE is unbiased-
each idiosyncratic error should be uncorrelated with
each explanatory variable across all time periods.
• Allows correlation between ɑI and explanatory
variables
• We cant include variables which are constant over
time.

8
Fixed Effect
• Other assumptions for validity of ols are that the
errors ui are homoskedastic and serially
uncorrelated.

• Degrees of freedom is NT-N-k

• Unbalanced Panel: When some panels have missing


years for some cross-sectional units.

9
First Difference
• First differenced eqn is simple: single cross
sectional eqn but each variable is differenced
over time.
• Yi2=β0+β1xi2+ɑi+ui2
• Yi1=β0+β1xi1+ɑi+ui1
• By subtracting we get first differenced eqn.
• First differencing is straight forward.

10
Random Effects
• yit=ß0+xit1ß1+xit2ß2+…..ɑi+uit
• We can include time dummies too.
• In FE we aim at eliminating alphas as it could be correlated
with x’s.
• If ɑI is uncorrelated with each explanatory variable in all time
periods then elimination will result in inefficient estimators.
• For RE we assume unobserved ɑi is uncorrelated with each
explanatory variable: Cov(xitj,ɑi)=0 t=1…T; j=1…k
• In RE: all FE assumptions are included with additional
assumption- ɑI is independent of all explanatory variables in
all time periods.
• If unobserved effect ɑI correlated with any expl variables we
should use FE or FD.
11
Random Effects
• If ɑI is uncorrelated with explanatory variable then
betas can be consistently estimated using single cross
section….or pooled OLS.
• If we define composite error vit=ɑi +uit then,
• yit=ß0+xit1ß1+xit2ß2+….i+vit
• Vit serially correlated as it has alpha…then under RE
• Corr(vit, vis)=σ2ɑ/ σ2ɑ+σ2u this serial correlation can
be substantial.
• Pooled OLS ignores it so SE will be incorrect …can
use GLS…must have large N and small T.
• Define lambda=1-[σ2u/ σ2u+Tσ2ɑ]1/2 between 0 and
1.
12
Random Effects
• yit-lambda*yi(bar)=……
• Bar denotes time averages.
• Eqn is with quasi-demeaned data.
• While FE subtracts time averages, RE subtracts a fraction
of time average-fraction depends on variances and time
period T.
• The GLS is pooled OLS …here errors are serially
uncorrelated.
• This allows for the variables constant over time…because
RE assumes that unobserved effect is uncorrelated with
all expl vars.
• Lambda is never known…can use estimator:
1-{1/[1+T(σ2ɑ^/σ2u ^]}1/2 where the estimators are
consistent.
13
DV Regression
• ɑI is intercept for person i that is to be estimated for
each i.
• We cant do for cross section-there would be (N+k)
parametres with N observations.
• We can estimate an intercept for each i by putting in
a DV for each cross section, along with the x’s.
• But with a large N it will be tedious.
• Still it has advantages: (i) gives same beta’s as in time
demeaned regression-similar to FE (ii) high R-sq (iii)
in some cases ɑI ^ are of interest.

14
FD vs FE
• If T=2 both are identical.
• When T>=3 not same. Both are unbiased and consistent so
choice depends on efficiency.
• If uit is not serially correlated, FE is more efficient and
Standard error of FE are valid.
• But Uit can be correlated over time. E.g. random walk ….FD is
better.
• When T is large FE should be used with caution….inferences
can be sensitive to assumptions….
• With large T FE is less sensitive to exogeneity assumption..

15
FE vs RE
• Decision is based on whether ɑi are best viewed as
parametres to be estimated or as outcomes of a
random variable.
• …in FE we allow different intercept for each obs, we
can estimate these intercepts by including DV or by
DV model.
• Even if we treat ɑI as random we must check whether
are uncorrelated with explanatory variables.
• If ɑI are uncorrelated with all xit then RE is
appropriate.
• But if ….are correlated with some x’s then FE should
be: RE will be inconsistent.
16
FE vs RE
• We can test whether there is correlation between
alphas and x’s.
• Hausmann (1978) tests for the null of no correlation
between ɑI and xit
• Beta (RE) is inconsistent under the alternative
hypothesis but Beta (FE) is consistent under both null
and alternative.
• Hausmann compares two estimators, if the
difference is significant then the null is rejected.

17
Incomplete Panels

• When some obs are missing:


Balanced sub-panel: Can discard missing
obs-it can be inefficient.
Unbalanced panel: Can use all info.

• We may face selection bias.

18

You might also like