Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


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?

share|improve this question

The problem exists with more than just the first observation. Take a pth order AR process. It is only the p+1st 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.

share|improve this answer
Michael, thanks. Is there a formula to use to arrive at the 1038.39 value in my example? – B_Miner Jul 18 '12 at 20:09
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. – Michael Chernick Jul 18 '12 at 21:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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