This might be due to my relative inexperience with time series modelling, but I am confused about the correct number of observations to report for an ARIMA/ARIMAX model. I couldn't find any post that directly gets at this (though Number of observations used for ARIMA modeling comes close).
Say I run the following model:
fit1 <- arima(lh, order = c(0,1,0))
And then check the number of “used” observations (wording from the documentation):
fit1$nobs
length(lh)
The number of observations is one less than the total length of the time series, because we difference it once (ARIMA(0,1,0)). Fair enough. But if I then add a lag:
fit2 <- arima(lh, order = c(1,1,0))
fit2$nobs
The number of “used” observations is the same, which is confusing to me, since I would have expected to lose an additional observation in the beginning of the series. How can we have a value for the lag at the first observation? Same thing goes for MA terms:
fit3 <- arima(lh, order = c(0,1,1))
fit3$nobs
How can we have a value for the lag of the error at the first observation? Clearly I’m missing something.
It gets even a little bit more confusing if I want to incorporate transfer functions with the arimax
function from the TSA
package, since arimax
doesn’t return a nobs
object nor does it have a nobs
method.
I would greatly appreciate some help on this!
Best,
Bertel