Page 1 of 1

Restricted Trend IN VECM

Posted: Tue Sep 05, 2017 9:57 am
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

Re: Restricted Trend IN VECM

Posted: Tue Sep 05, 2017 10:10 am
by TomDoan
Your SET ECT calculation is missing the trend and your ECTEQ has the CONSTANT rather than the trend.

Re: Restricted Trend IN VECM

Posted: Wed Sep 06, 2017 7:25 am
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.

Re: Restricted Trend IN VECM

Posted: Fri Jan 05, 2018 12:14 pm
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?

Re: Restricted Trend IN VECM

Posted: Mon Jan 08, 2018 3:59 pm
by alexecon
Is it possible to replicate this CATS instruction

Code: Select all

@cats(lags=2,dettrend=cidrift)
# myvar1 myvar2
in RATS? Thank you.

Re: Restricted Trend IN VECM

Posted: Tue Jan 09, 2018 9:34 am
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).