GMerrorsar(formula, data = list(), listw, na.action = na.fail,
zero.policy = FALSE, return_LL = TRUE, control = list(), verbose=FALSE)lm()listw object created for example by nb2listwna.fail), can also be na.omit or na.exclude with consequences for residuals and fitted values - in these cases the weights list will be subsetted to remove NAs in the data. It may be necessary to GMerrorsar() to terminate with an erroroptim.gmsarlm object returned when estimating for $lm object returned for the GMM fit}
optim, errorsarlm
Note that the fitted() function for the output object assumes that the response variable may be reconstructed as the sum of the trend, the signal, and the noise (residuals). Since the values of the response variable are known, their spatial lags are used to calculate signal components (Cressie 1993, p. 564). This differs from other software, including GeoDa, which does not use knowledge of the response variable in making predictions for the fitting data.