0
$\begingroup$

I have fitted a garch function using the tseries package in R, and I have observed that the series of residuals produced by the GARCH model begin with 'NAs', equal to the max order of the model.

E.g. For a GARCH(3,5) with 2000 observations, I am observing that the first 5 values for the residuals are NA, and then the remaining 1995 are non-NA values.

My question is, why are the NAs at the start of the residual series? I have set my data up so that the most recent data is at the start of the vector, and the oldest data is at the end of the vector. I would have thought that the last 5 residuals (observations 1996 to 2000) are the ones that are NA, as that is when the process "begins".

Is there some sort of assumption in R that the inputs in time-series modelling are arranged in a traditional chronological order, such that the first observation should be the oldest one? Is there any way to tell the garch function that the data is arranged in reverse chronological order?

$\endgroup$

1 Answer 1

0
$\begingroup$

Is there some sort of assumption in R that the inputs in time-series modelling are arranged in a traditional chronological order, such that the first observation should be the oldest one?

I think there is. Some classes such as ts have time series attributes making time indexing explicit, but if you use a simple vector, time series function in R will usually assume its first observation is the oldest one.

Is there any way to tell the garch function that the data is arranged in reverse chronological order?

I do not think you should attempt making the garch function deal with a reverse-ordered time series; rather, reverse it yourself before inputing into the function. For a vector x, you can use rev to reverse the order: rev(x).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.