 -- load the data into sca. Name the data ir1 & ir3.
input ir1,ir3. file 'm-gs1n3.dat'
 -- take log transformation. Call the transformed series r1t & r3t.
r1t=ln(ir1)
r3t=ln(ir3)
 -- identify VAR model via M-stat & AIC
miden r1t,r3t. no ccm. arfits 1 to 8.
 -- specify a VARMA(2,1) model. Name the model m1.
 -- Denote the coef-mtx by p1, p2, and t1.
mtsmodel m1. series r1t,r3t. @
model (i-p1*b-p2*b**2)series=p0+(i-t1*b)noise.
 -- estimation
mestim m1. method exact. hold resi(res1,res2)
 -- put zero parameter constraints
p1(2,1)=0
cp1(2,1)=1
p2(2,1)=0
cp2(2,1)=1
p2(2,2)=0
cp2(2,2)=1
t1(2,1)=0
ct1(2,1)=1
 -- redo estimation
mestim m1. method exact. hold resi(res1,res3).
 -- check residuals cross-correlation matrices
miden res1,res3.
stop
