Dear helpers, I am a beginner user of R and probably I am not using properly the function gls() of the library nlme. I estimated a model with AR(1) residuals but apparently the fitted and the predicted values arent constructed considering the autocorrelation of the residuals. It seems that instead of having: yt hat = (b hat) xt + Phi (ut-1 hat) the program gives just: yt hat = (b hat) xt To understand better this issue I tried to fit a model for a simulated AR(1) process with the following code: -------- library(tseries) library(nlme) set.seed(2) ar1sim <- arima.sim ( list (order = c (1,0,0), ar = 0.5), n = 200 ) reg <- gls ( ar1sim ~ 1, correlation = corAR1() ) plot(ar1sim) points(predict(reg), type = l, col = red) --------- And I obtained the plot of the fitted values (just the intercept) compared with the actual ones. Probably I am doing something wrong, because I dont think that the function should behave in this way, but I dont understand what. Thank you so much for your help, Carlo Fezzi