Allow option for generalized least squares (i.e. instead of ||r(x)||^2, have ||r(x)||_A^2, where A is the inverse of the correlation matrix; see https://en.wikipedia.org/wiki/Generalized_least_squares). This captures correlation/heteroskedacity in the residuals.