3
$\begingroup$

Given coefficients from an arima model, how do you calculate the "fitted value" for the first observation of the series?

For example, given the data (called xshort):

enter image description here

and a call to R:

mod<-Arima(xshort,order=c(1,0,0))
mod$coef

it is simple to produce the fitted values. For example the second entry in the series is: mod$coef[1]*xshort[1]+((1-mod$coef[1])*mod$coef[2])

But, how is the first fitted value calculated, which from Arima should be 1038.3884776139?

$\endgroup$

1 Answer 1

4
$\begingroup$

The problem exists with more than just the first observation. Take a $p$th order AR process. It is only the $p+1$st observation that can be expressed as the estimated function of the previous $p$ values. For the initial values, you need a set of values estimated by the model as occurring before the first observation. This is done by fitting the series and then predicting backwards. Box and Jenkins call this backcasting. So for the AR($p$) process, you need to generate $p$ starting values prior to X1. Then you can use these starting values and the model to fit the first $p-1$ observations.

$\endgroup$
2
  • $\begingroup$ Michael, thanks. Is there a formula to use to arrive at the 1038.39 value in my example? $\endgroup$
    – B_Miner
    Jul 18, 2012 at 20:09
  • $\begingroup$ Yes. You are doing AR(1) I take it? I don't have it off hand but you can find out how to compute it from the Box-Jenkins text. or our resident ARIMA guru IrishStat could probably tell you. $\endgroup$ Jul 18, 2012 at 21:38

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.