3

Is there a way to estimate an ARMA equation using the lm() function in R without using arima()?

Glen_b
  • 282,281
user43790
  • 165
  • It's probably worth making your question more general by removing the direct reference to R - there's nothing special about R for this question, and the question and answer apply to using linear regression to estimate ARMA much more generally. Please consider editing your question. – Glen_b Jul 02 '14 at 01:03
  • Sorry, my mistake, arima, not ARIMA. – user43790 Jul 02 '14 at 02:52

2 Answers2

6

Not easily.

You can easily estimate an $\text{AR}(p)$ by regressing $(y_{p+1},...,y_n)$ on its lags. If $n$ is large and $p$ is not too near the stationarity boundary, the neglected likelihood for the first $p$ observations should make little difference.

I can think of a somewhat complicated way to get a rough estimate of an ARMA where the MA order is reasonably small via regression (which might be iterated to improve the estimate), but generally speaking it's going to be much easier to use the more standard approaches.

You might also use nonlinear least squares to estimate the MA parameters by inverting the MA as an infinite AR and then cutting the terms off at some finite but large lag, and for a long series this should work fairly well, but again, this is harder than the more usual methods.

Glen_b
  • 282,281
  • 2
    Thanks a lot. I am trying to do structural break test such as Chow test on an ARMA model. In using strucchange package, it looks like they do not accept arima() objects in functions such as sctest(). Since they accept lm() objects, I thought I might try modelling ARMA using lm(). – user43790 Jul 02 '14 at 02:39
  • 1
    What part of the model are you testing for a structural break? It might be better to post a question about testing ARMA models for structural breaks. – Glen_b Jul 02 '14 at 02:44
  • 2
    This information should go in your new question. – Glen_b Jul 02 '14 at 03:05
0

An $\text{ARMA}(1,1)$ model can be approximated by

$X(t)= \beta_0 + \beta_1 X(t-1) + \beta_2 [(X(t-1)-\text{predict.ahead}(X(t-2),1)]+ e(t)$.

I don't know how to do this in R code but it would require initializing e(1)=0 and a for loop.

Glen_b
  • 282,281