able in the package nlme. Actually, the GLS directly models the spatial covariance structure in the variance-covariance matrix using parametric functions. But first we'll ignore spatial autocorrelation and re-fit the model we had in the introduction, this time using the gls function (instead of lm). The results will be the same, but we will need this model later when doing model comparisons using AIC (i.e. we can't compare the AICs from the model fit using lm with that fit using gls).