I'm trying to get understand why the values for my model are different when using two different functions.
The first one is from Example 9.2 (International Visitors to Australia), using the deterministic trend model: https://www.otexts.org/fpp/9/1. The formula being used in the example is:
y_t = intercept of AR + coefficient of X * value of X at t0 + AR coefficient * value of X at t-1 (error = 0)
The second one is using the
fitted function in the "forecast" library in R.
X5 are independent variables.
Y is the dependent variable. I am running an
AR1 <- arima(datasource[,"Y"], order = c(1,0,0), xreg = datasource[,c("X1", "X2", "X3", "X4", "X5")])) fitted(AR1)
Very simply put, why are the forecasted values between the two not the same? Thanks in advance.