G. Chidambaran Iyer <[email protected]> asked about estimating the
parameters of a fixed-effects panel-data model with an unknown form of
serial correlation and cross-sectional heteroskedasticity.
Below I outline a method that will model the autocorrelation and handle the
heteroskedasticity by robust standard errors.
The Stata command -xtgee- estimates the parameters of a
population-averaged longitudinal model. This approach extends the
generalized linear model (GLM) to longitudinal data. As discussed in [XT]
xtreg, using -xtgee- with the -link(identity)-, the -family(gaussian)- and
corr(exchangeable) produces the same results as fitting a random-effects
model by maximum likelihood. Below is an example.
. webuse grunfeld
. xtreg invest mvalue kstock, mle nolog
Random-effects ML regression Number of obs = 200
Group variable (i): company Number of groups = 10
Random effects u_i ~ Gaussian Obs per group: min = 20
avg = 20.0
max = 20
LR chi2(2) = 293.43
Log likelihood = -1095.257 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
invest | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mvalue | .1097626 .0103389 10.62 0.000 .0894988 .1300265
kstock | .307942 .0171006 18.01 0.000 .2744254 .3414585
_cons | -57.7672 27.70004 -2.09 0.037 -112.0583 -3.476114
-------------+----------------------------------------------------------------
/sigma_u | 80.29729 18.37811 51.27213 125.7536
/sigma_e | 52.49255 2.69306 47.47094 58.04534
rho | .7005943 .0985226 .4881266 .8603709
------------------------------------------------------------------------------
Likelihood-ratio test of sigma_u=0: chibar2(01)= 193.09 Prob>=chibar2 = 0.000
. xtgee invest mvalue kstock, link(identity) family(gaussian) ///
corr(exchangeable) nolog
GEE population-averaged model Number of obs = 200
Group variable: company Number of groups = 10
Link: identity Obs per group: min = 20
Family: Gaussian avg = 20.0
Correlation: exchangeable max = 20
Wald chi2(2) = 668.53
Scale parameter: 9203.121 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
invest | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mvalue | .1097626 .0103384 10.62 0.000 .0894997 .1300256
kstock | .307942 .017072 18.04 0.000 .2744815 .3414025
_cons | -57.7672 27.69738 -2.09 0.037 -112.0531 -3.481341
------------------------------------------------------------------------------
We could have used -xtgee- to fit a model with a panel-level random-effect
and within-panel serial correlation by specifying corr(unstructured) in the
call to -xtgee-. For example,
. xtgee invest mvalue kstock, link(identity) family(gaussian) ///
corr(unstructured) nolog
GEE population-averaged model Number of obs = 200
Group and time vars: company year Number of groups = 10
Link: identity Obs per group: min = 20
Family: Gaussian avg = 20.0
Correlation: unstructured max = 20
Wald chi2(2) = 54.26
Scale parameter: 12160.61 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
invest | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mvalue | .0857029 .0116573 7.35 0.000 .062855 .1085508
kstock | .1551136 .0431404 3.60 0.000 .0705599 .2396673
_cons | -11.12214 23.45177 -0.47 0.635 -57.08677 34.84249
------------------------------------------------------------------------------
G. Chidambaran wants to fit a model a model with fixed-effects, not
random-effects. G. Chidambaran can remove the fixed-effects by
first-differencing the data and then estimating the remaining parameters by
-xtgee , corr(unstructured). For example,
. xtgee D.(invest mvalue kstock), link(identity) family(gaussian) ///
corr(unstructured) noconstant nolog
GEE population-averaged model Number of obs = 190
Group and time vars: company year Number of groups = 10
Link: identity Obs per group: min = 19
Family: Gaussian avg = 19.0
Correlation: unstructured max = 19
Wald chi2(2) = 308.79
Scale parameter: 1876.358 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
D.invest | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mvalue |
D1. | .072526 .0050103 14.48 0.000 .0627059 .0823461
kstock |
D1. | .3312199 .0299399 11.06 0.000 .2725387 .389901
------------------------------------------------------------------------------
Specifying -robust- will produced estimated standard errors that are robust
to cross-sectional conditional heteroskedasticity.
. xtgee D.(invest mvalue kstock), link(identity) family(gaussian) ///
corr(unstructured) noconstant robust nolog
GEE population-averaged model Number of obs = 190
Group and time vars: company year Number of groups = 10
Link: identity Obs per group: min = 19
Family: Gaussian avg = 19.0
Correlation: unstructured max = 19
Wald chi2(2) = 1122.79
Scale parameter: 1876.358 Prob > chi2 = 0.0000
(Std. Err. adjusted for clustering on company)
------------------------------------------------------------------------------
| Semi-robust
D.invest | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mvalue |
D1. | .072526 .0048388 14.99 0.000 .0630422 .0820098
kstock |
D1. | .3312199 .0351578 9.42 0.000 .2623119 .4001279
------------------------------------------------------------------------------
-David
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/