which I'm testing across multiple time periods and 5 countries. Through
using Stata's "help" function and reading the FAQs, I've learned of the
numerous options available to correct for the errors not being iid. The
differences between some of these are clear, but I am not sure about all of
the differences:
"xtreg return monday january, i(country) fe" will give me a fixed effects
regression, equivalent to generating 5 dummy variables for each country and
thus effectively allowing the intercept to vary by country. However, the
standard errors generated assume the errors are iid.
"xtgls" allows for non-iid errors. E.g. "xtgls return monday january, p(c)
c(p)" allows for heteroschedasticity and cross-sectional correlation across
panels (countries in my example), in addition to panel-specific AR1
autocorrelation within each panel.
- How does xtgls differ from xtreg, re? The random effects model is often
referred to as the FGLS estimator for panel data in textbooks.
"xtpcse" allows for heteroschedastic and contemporaneously correlated
errors, and potentially also panel-specific AR1 autocorrelation within each
panel. E.g. "xtpcse return monday january c(p)"
- How does this differ from the xtgls formulation above?
"xi : reg return monday january i.country, cluster(country)" allows for
observations to be correlated within each panel, and heteroschedastic across
panels, but independent across panels. It works best when you have many
panels.
- How is this different from running: "xtgls return monday january, p(h)
c(p)"?
I would like to err on the conservative side and "over-correct" for
violations of iid. Please could you advise me on the best specification to
use - I think it's "xtpcse return monday january c(p)", but I don't know how
this differs from "xtgls return monday january, p(c) c(p)"
Finally, I would like to allow for the coefficient on "january" to differ
across countries, but the coefficient on "monday" to remain constant (hence
I still would like to use the panel data model).
I can do a simple OLS by xi : reg return monday i.country*january. However,
what options are available to me to correct for errors not being iid? I can
still do "cluster(country)" but this assumes errors are independent across
panels. I can't seem to be able to accommodate panel-specific coefficients
on any of the regressors within the xtgls or xtpcse framework. I would like
to be able to correct for contemporaneously correlated errors across panels.
Thanks in advance for any help. Normally my problem is not knowing any
appropriate function; here I have many alternatives available and am not
sure how to choose between them.