IRF from the VARMA model

Questions and discussions on Time Series Analysis
luxu1983
Posts: 61
Joined: Wed Aug 12, 2009 10:53 pm

IRF from the VARMA model

Unread post by luxu1983 »

dear Tom
how can i get the IRF from the VARMA model
may you give me an example?
thank you very very much
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: IRF from the VARMA model

Unread post by TomDoan »

How do you have the VARMA model represented? State space form or linear equations with residuals?
luxu1983
Posts: 61
Joined: Wed Aug 12, 2009 10:53 pm

Re: IRF from the VARMA model

Unread post by luxu1983 »

TomDoan wrote:How do you have the VARMA model represented? State space form or linear equations with residuals?
dear TomDoan
it is not state space form
i estimate it using MAX L
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: IRF from the VARMA model

Unread post by TomDoan »

If there are p AR terms, with the matrices in phi(1),...,phi(p) and q MA terms with matrices theta(1),...,theta(q), then this will generate (non-orthogonal) responses for NSTEPS steps. (n is the number of variables). The IRF's for step h (starting at 1=impact) are in psi(h). For any other type of shocks, change the psi(1) to the impacts that you want.

Code: Select all

dec vect[rect] psi(nsteps)
compute psi(1)=%identity(n)
do i=1,nsteps-1
   if i<=q
      compute psi(i+1)=theta(i)*psi(1)
   else
      compute psi(i+1)=%zeros(n,n)
   do j=1,%imin(p,i)
      compute psi(i+1)=psi(i+1)+phi(j)*psi(i+1-j)
   end do j
end do i
Post Reply