1
$\begingroup$

I am fitting an AR(1) model and the results I'm getting are too high and don't make sense. Perhaps I'm misunderstanding something, can someone clear this up?

data <- c(0.1287426, 0.1447894, 0.1541330, 0.1481999, 0.1348838, 0.1165681, 0.1140563, 0.1179652, 0.1404826, 0.1418325)
model <- arima(data, c(1,0,0))
model$coef

AR1 = .5582418
Intercept = .1343918

This seems to be saying that the model is

$$ X_t = 0.134 + .558X_{t-1} $$

which fits values closer to .2, much higher than any values in my series. What am I doing wrong here?

EDIT: My residuals are shown below

-0.004686990  0.013551235  0.013936841  0.002787753 -0.007216242 -0.018098339 -0.010385551 -0.005074459  0.015260830  0.004040577
$\endgroup$

2 Answers 2

2
$\begingroup$

They way arima function works in R can be confusing. The resulting model is not the one that you stated. It's actually $$(X_t-0.134) = 0.558(X_{t−1} - 0.134) + e_t$$

So your prediction of the next value is

$0.1343918 + 0.5582418(0.1418325 - 0.1343918) = 0.1385455$

which is equal to what you get from

predict(model)$pred
$\endgroup$
4
  • $\begingroup$ Thank you. This is what I was looking for. Is there a way I can specify the model as I originally stated? My goal is to calculate the mean-reverting level of AR(1) $\endgroup$ Commented Aug 14, 2020 at 23:05
  • $\begingroup$ you can rearrange terms to get the right intercept: in this case, 0.05936867 $\endgroup$
    – Julius
    Commented Aug 14, 2020 at 23:06
  • $\begingroup$ I rearranged the terms and got B0(1-B1) = .132(1-.558) = .0592 is this correct? $\endgroup$ Commented Aug 14, 2020 at 23:11
  • $\begingroup$ Yes, that's right. $\endgroup$
    – Julius
    Commented Aug 14, 2020 at 23:15
0
$\begingroup$

Well, maybe nothing. You have shown what the intercept and coefficient for the first term are, but you didn't show what the fit was. You've asked ARIMA to generate an output - and it's generated it. It doesn't mean it's a good fit. Maybe an AR1 model isn't the right choice.

$\endgroup$
1
  • $\begingroup$ I've posted the residuals $\endgroup$ Commented Aug 14, 2020 at 22:51

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.