Original variable predictions from a gls model

I'm not sure I understand completely what you are asking. Are you trying to make sure the autocorrelation/heterscedasiticity is present in the predictions? Those primarily affect the variance of each prediction, not the estimated mean value.

Consider making a small example dataset with fitted model that demonstrates what you're talking about. (See some info on making a reproducible example here.) Or you could write out the equations that shows what the model does for predictions vs what you want.

Note you can read a bit more about what predict() does for GLS objects by looking at the help page for predict.gls. That could also be a place to get an example that demonstrates the issue.

1 Like