Skip to content

time series with autcorrelated errors - matrix not invertible

1 message · Ben Bolker

#
On 16-07-31 12:27 PM, Steven Orzack wrote:
gls uses generalized least squares -- described in detail in Pinheiro
and Bates 2000 -- basically, nonlinear optimization over the correlation
parameter, minimizing the sums of squares of the 'whitened' residuals.
   For ar, see ?ar: the default solves the Yule-Walker equations (see
ar.yw) ...

  As I hinted, if I had to do this I would (1) build my own brute-force
AR solver (probably based on nlme::corARMA), (2) use try() to catch the
cases where AR(2) failed and revert to AR(1)