Another question - is there a way to use autocorrelation with OLS,
rather than GLS?
I am really blindly following Beck and Katz (1995) here, and they
recommend OLS rather than Feasible Generalized Least Squares for
panel data where the number of individuals is larger than the number
of time units,
No, by definition the off-diagonal elements in the covariance matrix for an OLS
are 0. Thus, OLS is a special case of a GLS. You can see this if you write out
the formulae for an OLS solution and GLS solution.
The typical solution for the standard errors in an OLS are (X'X)^{-1}*s^2. This
is
Specifically the Beck and Katz article points out that Feasible GLS,
which involves a special method for correcting standard errors for
panel data, doesn't work when time period is less than number of
individuals. They suggest using OLS, then correcting the standard
errors. But their method does
In the nlme package you can find the gls() function to account for
autocorrelation over time using corAR1. Syntax might look something like
this:
fm1 - gls(response ~ IV, long, correlation=corAR1(form=~1|ID),
method='ML')
You can also use weights() for heteroscedasticity.
-Harold
-Original
That's very helpful - I was on the point of giving up and going with
Stata! I will look into that in more detail. I assume that afterwards
it would be ok to apply the Beck and Katz procedure to get panel
corrected standard errors.
Cheers
David
On Thu, 10 Feb 2005 12:36:32 -0500, Doran, Harold
Assuming I have years in YEAR and state ids in ID, I guess the
correlation ought to be
corAR1(form = ~ YEAR | ID)
?
Thanks a lot,
David
On Thu, 10 Feb 2005 12:36:32 -0500, Doran, Harold [EMAIL PROTECTED] wrote:
In the nlme package you can find the gls() function to account for
Are the years equally spaced and in time order?
If so, it probably doesn't matter, and if not you may want corCAR1 not
corAR1.
On Thu, 10 Feb 2005, David Hugh-Jones wrote:
Assuming I have years in YEAR and state ids in ID, I guess the
correlation ought to be
corAR1(form = ~ YEAR | ID)
?
Thanks a