[R] prediction using gls with correlated residuals

Carlo Fezzi fezzi at stat.unibo.it
Tue May 31 20:38:35 CEST 2005


Dear all,
I am a beginner user of R and I tried to fit a gls model with
explanatory variables and an AR(1) correlation component using the
function "gls" with:

correlation = corAR1 (form = ~ 1)

It should mean that the residual follows an AR(1) process, isn't it?

The problem is that, if I use the funcion "predict" I noticed that the
predicted values are the same as if I estimate the same model with the
function "lm" considering the residuals indipendent (this is true both
in and out of sample).

Does it means that "predict" doesn't use the information about the
residual correlation to improve predictions?

How can I overcome this problem?

Thank you so much for your help,

Carlo Fezzi




More information about the R-help mailing list