Hello
I am conducting a meta analysis by means of a 2-Period Random Effects Panel.
As part of this I am testing for autocorrelation in the residuals using xtregar, specifically (code example from Grunfeld):
The resulting Durbin-Watson Test Statistic = 2. This indicates no autocorrelation in the residuals.
On closer inspection the residuals for the observations in the first period = .
This feature drives the Durbin-Watson Test Statistic to equal 2.
I have examined the underlying code for xtregar and am unable to understand the steps sufficiently well to know why the observations in the first period = .
My suspicion is that random effects examines between-studies variance and this is largely responsible for producing residuals in the first period = .
I would be grateful for your help with these questions please:
I am conducting a meta analysis by means of a 2-Period Random Effects Panel.
As part of this I am testing for autocorrelation in the residuals using xtregar, specifically (code example from Grunfeld):
Code:
xtregar invest mvalue kstock , re lbi
On closer inspection the residuals for the observations in the first period = .
This feature drives the Durbin-Watson Test Statistic to equal 2.
I have examined the underlying code for xtregar and am unable to understand the steps sufficiently well to know why the observations in the first period = .
My suspicion is that random effects examines between-studies variance and this is largely responsible for producing residuals in the first period = .
I would be grateful for your help with these questions please:
- What is driving the residuals in the first period to = .
- Is it possible and correct to test for autocorrelation in the residuals in a 2-Period Random Effects Panel by means of xtregar, re lbi?
- If it is not possible, what would be the suggested method(s) to test for autocorrelation?
Code:
clear
use http://www.stata-press.com/data/r15/grunfeld
xtset
keep if year ==1935 | year ==1936
xtregar invest mvalue kstock , re lbi
predict resid_1, e
. xtset
panel variable: company (strongly balanced)
time variable: year, 1935 to 1954
delta: 1 year
. keep if year ==1935 | year ==1936
(180 observations deleted)
. xtregar invest mvalue kstock , re lbi
RE GLS regression with AR(1) disturbances Number of obs = 20
Group variable: company Number of groups = 10
R-sq: Obs per group:
within = 0.4323 min = 2
between = 0.7677 avg = 2.0
overall = 0.7468 max = 2
Wald chi2(3) = 34.21
corr(u_i, Xb) = 0 (assumed) Prob > chi2 = 0.0000
------------------------------------------------------------------------------
invest | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mvalue | .080564 .0138617 5.81 0.000 .0533955 .1077325
kstock | -.1477811 .2628503 -0.56 0.574 -.6629583 .3673961
_cons | 25.27763 28.98971 0.87 0.383 -31.54115 82.09642
-------------+----------------------------------------------------------------
rho_ar | 0 (estimated autocorrelation coefficient)
sigma_u | 51.372023
sigma_e | 31.41829
rho_fov | .72778372 (fraction of variance due to u_i)
theta | .60307143
------------------------------------------------------------------------------
modified Bhargava et al. Durbin-Watson = 2
Baltagi-Wu LBI = 3
. predict resid_1, e
(10 missing values generated)
(10 missing values generated)

Comment