Baisc R question regarding ARMA

Vatsa

New Member
This should be an easy question for expert users here.

I am using the function 'arma' in R which appears as following in the documentation:

Code:
arma(x, order = c(1, 1), lag = NULL, coef = NULL,
include.intercept = TRUE, series = NULL, qr.tol = 1e-07, ...)
For input 'x' do we have x[1] as the most recent observation or is x[1] the oldest observation. I have tried looking through the manuals and I don't find it explicitly mentioned anywhere.

Thanks

bryangoodrich

Probably A Mammal
Typically you index vectors in a time series as t1, t2, ..., so x[1] would be the first (oldest) observation in your sample. If your data is ordered with the most recent first, then rev(x) will flip that.

And if you're just running an arima, you can just use the arima function that comes with R.