Microeconometrics
dr Katarzyna Kopczewska
Class 05 / Outline:
-advanced panel models

Class 05 issues

Use the same dataset as in Class 04

TASKS

  1. Estimate basic models (pooled, FE, RE)
  2. Check for heteroskedasiticity and autocorrelation and other problems
  3. Try NEW models via .xtregar, .xtpcse, xtgls
  4. Find differences in models. Which one is the best. Try using postestimation commands.

Details:

. xtregar fits fixed affects and random effects models where the disturbance follows an AR(1) process:

where and

It can be FIXED or RANDOM effects

To be sure whether autocorrelation of effror term apperas update your STATA with . xtserial command.

When serial autocorrelation (in groups/series) and/or heteroskedasticity appear two types of models can help: .xtpcse or .xtgls

Testing for heteroskedasticity is given here:

. xtpcse: from STATA help file: “. xtpcse calculates panel-corrected standard error (PCSE) estimates for linear cross-sectional time-series models where the parameters are estimated by OLS or Prais-Winsten regression. When computing the standard errors and the variance-covariance estimates, . xtpcse assumes that the disturbances are, by default, heteroskedastic and contemporaneously correlated across panels. Use it when T > N

xtgls estimate panel models under various assumptions about heterogeneityof variances across panels and possible serial correlation.

Options:

noconstant suppress constant term

panels(iid)use i.i.d. error structure

panels(heteroskedastic)use heteroskedastic but uncorrelated error structure

panels(correlated)use heteroskedastic and correlated error structure

corr(independent)use independent autocorrelation structure

corr(ar1)use AR1 autocorrelation structure

corr(psar1)use panel-specific AR1 autocorrelation structure

Other useful stuff:

. xtline var1 # to produce line chart of given variable for every unit over time

. xtcsd # Testing for cross-sectional dependence in panel-data models INSTALL IT!

. xttest0 # Breusch and Pagan LM test for random effects, for use after xtreg, re,

. xttest2 # “calculates the Breusch-Pagan statistic for cross-sectional independence in the residuals of a fixed effect regression model or a GLS model estimated from cross-section time-series data. xtreg, fe estimates this model assuming independence of the errors”. INSTALL IT!

. xttest3 # “calculates a modified Wald statistic for groupwise heteroskedasticity in the residuals of a fixed effect regression model. It is for use after xtreg, fe or xtgls (with the default panels option)” INSTALL IT! This is new version of .xttest1, which was withdrawn