Starting out with arima models in R, I do not understand why fitted.values (of an AR(2) process for example) are not part of the output like they are in regressions. Did I miss them when running str(result)
or did I get something completely wrong?
1 Answer
Use fitted()
function from the forecast
package. Since arima object saves residuals it is easy to compute fitted values from it.
-
$\begingroup$ okay so you mean like:
fitted(arima(somets,c(2,0,0))
respectivelysomets-arimaresult$residuals
. I just wondered WHY this is not part of the output – is it somehow not a good idea to look at these? $\endgroup$– hans0l0Mar 7, 2011 at 15:34 -
4$\begingroup$ The fitted values from an ARIMA object are one-step forecasts. They are not very interesting and you don't usually need to look at them. The residuals, on the other hand, are useful for checking model assumptions and to see whether the information in the data has been adequately captured in the fitted model. $\endgroup$ Mar 8, 2011 at 1:28
-
$\begingroup$ @Rob @ran2, I agree with Rob's comment! $\endgroup$ Mar 8, 2011 at 6:21
-