Restricted Trend IN VECM

Questions and discussions on Vector Autoregressions
alexecon
Posts: 72
Joined: Fri Oct 30, 2015 12:16 pm

Restricted Trend IN VECM

Unread post by alexecon »

The Pi matrix retrieved using %VECMPI from the estimation using the code below makes me believe that the trend has not been included in the cointegrating relation (Pi is a 2x2 matrix instead of the 2x3 I was expecting). Can you help find the omission/error? Many thanks.

Code: Select all

@johmle(det=rtrend,lags=2,cv=cv)
# myvar1 myvar2
*
* Normalize to a unit coefficient on myvar1
*
compute cv=cv/cv(1)
*
* This is the error correction series
*
set ect = cv(1)*myvar1+cv(2)*myvar2
*
equation(coeffs=cv) ecteq *
# myvar1 myvar2 constant
*
set dlaudusd 2010:7:22 2017:6:8 = myvar1{0}-mvar1{1}
set dsiadbuynf 2010:7:22 2017:6:8 = myvar2{0}-myvar2{1}
*
system(model=vecm)
variables myvar1 myvar2
lags 1 2
det constant 
ect ecteq 
end(system)
estimate
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Restricted Trend IN VECM

Unread post by TomDoan »

Your SET ECT calculation is missing the trend and your ECTEQ has the CONSTANT rather than the trend.
alexecon
Posts: 72
Joined: Fri Oct 30, 2015 12:16 pm

Re: Restricted Trend IN VECM

Unread post by alexecon »

Of course. The following worked:

Code: Select all

set trend = t
set ect = cv(1)*myvar1+cv(2)*myvar2+cv(3)*trend
equation(coeffs=cv) ecteq *
# myvar1 myvar2 trend
Thank you.
alexecon
Posts: 72
Joined: Fri Oct 30, 2015 12:16 pm

Re: Restricted Trend IN VECM

Unread post by alexecon »

Can you please put me out my misery here. In CATS, this

Code: Select all

@cats(lags=2,dettrend=cidrift)
# myvar1 myvar2
gives me a 2x3 matrix Pi. I am trying to replicate this in RATS with the following:

Code: Select all

@johmle(lags=2,det=rtrend,cv=cv)
# myvar1 myvar2
*
compute cv=cv/cv(1)
*
set trend = t
set ect = cv(1)*myvar1+cv(2)*myvar2+cv(3)*trend
equation(coeffs=cv) ecteq *
# myvar1 myvar2 trend
*
system(model=vecm)
variables myvar1 myvar2
lags 1 2 
det constant
ect ecteq
end(system)
*
compute pimat=%vecmpi
dis pimat
but I'm getting a 2x2 matrix for Pi and very different estimates, which indicate that the two models are not equivalent. Where am I going wrong?
alexecon
Posts: 72
Joined: Fri Oct 30, 2015 12:16 pm

Re: Restricted Trend IN VECM

Unread post by alexecon »

Is it possible to replicate this CATS instruction

Code: Select all

@cats(lags=2,dettrend=cidrift)
# myvar1 myvar2
in RATS? Thank you.
alexecon
Posts: 72
Joined: Fri Oct 30, 2015 12:16 pm

Re: Restricted Trend IN VECM

Unread post by alexecon »

OK, I reconstructed Pi by multiplying the vector of ECTs with the cointegrating vector and generated the 2x3 matrix I was looking for. Figured out that %VECMPI does not include the estimates of the trends (even though they are in the CV).
Post Reply