4
$\begingroup$

I am trying to write an AR(p) model as a MA process, and to extract the θ and ϕ coefficients of the linear models for an ARMA(p,q).

In R, there is a function ARMAtoMA cf https://www.jstatsoft.org/article/view/v023i05/v23i05.pdf

I don't know any equivalent to ARMAtoMA in Mathematica, and I could not find any. I just see ArimaTheta, ArimaPhi and others in Economic and Financial Modeling with Mathematica (Hal Varian) p378, but they come from the author package.

Are there native Mathematica functions that I can use with the function ARProcess? Are there other suggestions for how to do that.

Thanks for any help.

$\endgroup$
1
  • 1
    $\begingroup$ Maybe MAProcess[ARMAProcess[{α}, {β}, Σ], q] with q a n integer? From the docs on MAProcess: MAProcess[tproc,q] gives a moving-average representation of the time series process tproc of order q. $\endgroup$
    – kglr
    Oct 10, 2016 at 21:34

1 Answer 1

4
$\begingroup$

Starting with a MAProcess:

In[29]:= ma = MAProcess[c, {b1, b2}, v];

Convert to ARProcess of order 5:

In[31]:= ARProcess[ma, 5]

Out[31]= ARProcess[(1 - b1 + b1^2 - b1^3 + b1^4 - b1^5 - b2 + 
    2 b1 b2 - 3 b1^2 b2 + 4 b1^3 b2 + b2^2 - 
    3 b1 b2^2) c, {b1, -b1^2 + b2, 
  b1^3 - 2 b1 b2, -b1^4 + 3 b1^2 b2 - b2^2, 
  b1^5 - 4 b1^3 b2 + 3 b1 b2^2}, v]

Convert to ARMAProcess with orders (3,1):

In[34]:= ARMAProcess[ma, {3, 1}]

Out[34]= ARMAProcess[(1 + (b1^4 - 3 b1^2 b2 + b2^2)/(
    b1^3 - 2 b1 b2)) (1 + (b1 b2^2)/(b1^3 - 2 b1 b2) - b2^3/(
    b1^3 - 2 b1 b2) + (-b1^2 b2 + b2^2)/(
    b1^3 - 2 b1 b2)) c, {-((-b1^2 b2 + b2^2)/(b1^3 - 2 b1 b2)), -((
   b1 b2^2)/(b1^3 - 2 b1 b2)), b2^3/(b1^3 - 2 b1 b2)}, {(
  b1^4 - 3 b1^2 b2 + b2^2)/(b1^3 - 2 b1 b2)}, v]

Start with an ARMAProcess:

In[35]:= arma = ARMAProcess[c, {a1, a2}, {b1, b2}, v];

Convert to MAProcess of order 4:

In[36]:= MAProcess[arma, 4]

Out[36]= MAProcess[(1 + a1 + a1^2 + a1^3 + a1^4 + a2 + 2 a1 a2 + 
    3 a1^2 a2 + a2^2) c, {a1 + b1, a1^2 + a2 + a1 b1 + b2, 
  a1^3 + 2 a1 a2 + a1^2 b1 + a2 b1 + a1 b2, 
  a1^4 + 3 a1^2 a2 + a2^2 + a1^3 b1 + 2 a1 a2 b1 + a1^2 b2 + a2 b2}, v]

Convert to ARProcess of order 5:

In[38]:= ARProcess[arma, 5]

Out[38]= ARProcess[(1 - b1 + b1^2 - b1^3 + b1^4 - b1^5 - b2 + 
    2 b1 b2 - 3 b1^2 b2 + 4 b1^3 b2 + b2^2 - 3 b1 b2^2) c, {a1 + b1, 
  a2 - a1 b1 - b1^2 + b2, -a2 b1 + a1 b1^2 + b1^3 - a1 b2 - 2 b1 b2, 
  a2 b1^2 - a1 b1^3 - b1^4 - a2 b2 + 2 a1 b1 b2 + 3 b1^2 b2 - 
   b2^2, -a2 b1^3 + a1 b1^4 + b1^5 + 2 a2 b1 b2 - 3 a1 b1^2 b2 - 
   4 b1^3 b2 + a1 b2^2 + 3 b1 b2^2}, v]

Convert to ARMAProcess with orders (1,1):

In[39]:= ARMAProcess[arma, {1, 1}]

Out[39]= ARMAProcess[(1 + (a1^2 + a2 + a1 b1 + b2)/(-a1 - b1)) (1 + (
    a2 - a1 b1 - b1^2 + b2)/(-a1 - b1)) c, {-((
   a1^2 + a2 + a1 b1 + b2)/(-a1 - b1))}, {(
  a2 - a1 b1 - b1^2 + b2)/(-a1 - b1)}, v]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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