## programming for vecm model

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

15sehl19
Posts: 3
Joined: Mon Sep 11, 2017 6:03 am

### programming for vecm model

hello sir,

I need to make the programming of the algorithm of VECM model in EViews. I have a 242 data series of core inflation and one series in headline inflation data. all the core inflation data is non-stationary and become stationary at first difference. similarly the headline inflation. I need to check the Johanson cointegration test for each core inflation with headline inflation data and then further test the vecm model with each core inflation data and headline inflation data to identify the long run association. kindly let me know the programming and algorithm to run the test with a multi data series.

EViews Matt
EViews Developer
Posts: 256
Joined: Thu Apr 25, 2013 7:48 pm

### Re: programming for vecm model

Hello,

A loop that creates and tests 242 VEC models is certainly possible, but you're somewhat vague on where your difficulty lies. Are you having difficulty understanding EViews' loops, how to iterate through your specific data, or how to create the VECs inside the loop?

15sehl19
Posts: 3
Joined: Mon Sep 11, 2017 6:03 am

### Re: programming for vecm model

hello,
thanks for the reply.

yes, i am having difficulty in understanding the EViews' loops, how to iterate through your specific data, and how to create the VECs inside the loop.

EViews Matt
EViews Developer
Posts: 256
Joined: Thu Apr 25, 2013 7:48 pm

### Re: programming for vecm model

It sounds like you need to take a look at An introduction to EViews programming and/or EViews Illustrated (chapter 16), but here is a simple loop that creates VEC models and performs the Johanson cointegration test:

Code: Select all

`' Create a list of all the core inflation series names, assuming the names all start with the letter x.%core_inf_series = @wlookup("x*")' Loop throught each core inflation series name.for %s {%core_inf_series}   ' Define a name for the VEC involving this series.   %vec_name = "vec_" + %s   ' Create the VEC, assuming the headline inflation series is called y.   var {%vec_name}.ec 1 1 {%s} y   ' Display a Johanson cointegration test.   {%vec_name}.coint(d)next`

Return to “Programming”

### Who is online

Users browsing this forum: No registered users and 6 guests