Programing Restriction VECM

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

JUAN FRANCISCO
Posts: 1
Joined: Tue Mar 13, 2012 6:03 am

Programing Restriction VECM

Postby JUAN FRANCISCO » Tue Mar 13, 2012 6:19 am

Hi,

I made a program to estimate a vec with 3 variables anda a moving sample. I need to introduce restriction on the alfas (a(2,1)=0, a(3,1)=0), but I dont understand the programming guide.
How can I write these restriction in the program?

Thanks,

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Programing Restriction VECM

Postby EViews Gareth » Tue Mar 13, 2012 8:21 am

Code: Select all

var v v.append(coint) a(2,1) =0, a(3,1)=0 v.ec(restrict) 1 3 x y w

script
Posts: 2
Joined: Tue May 03, 2016 3:48 am

Re: Programing Restriction VECM

Postby script » Tue May 03, 2016 4:41 am

Hello!
I have problems with programming restrictions on betas in VECM with 2 cointegration vectors. So when I estimate vecm with restrictions manually and then go to Capture, I see the following:

Code: Select all

var var01 var01.append(coint) B(1,1)=0, B(1,3)=0, B(2,2)=0, B(2,4)=0 var01.ec(c,2) 1 2 log(x) log(y) log(z) log(w)
But if I run this code in program it will not put restrictions on variables, so estimated vecms (manualy and by program) are different. Then I tried another way to put restritions (found in help):

Code: Select all

var var01 var01.append(coint) B(1,1)=0, B(1,3)=0, B(2,2)=0, B(2,4)=0 var01.ec(restrict) 1 2 log(x) log(y) log(z) log(w)
But then I had this error message:

Restrictions must be linearly independent in "DO_
VAR01.EC(RESTRICT) 1 2 LOG(x) LOG(y)
LOG(z) LOG(w)".

So how can I put restrictions on betas in program code?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: Programing Restriction VECM

Postby EViews Gareth » Tue May 03, 2016 6:18 am

You were close!

I'll see that the command capture get's tidied up.

The correct command should be:

Code: Select all

var01.ec(c,2, restrict) 1 2 log(x) log(y) log(z) log(w)

script
Posts: 2
Joined: Tue May 03, 2016 3:48 am

Re: Programing Restriction VECM

Postby script » Tue May 03, 2016 10:47 pm

Thanks! Now it works!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests