Possibility to create group of "depends" variables from equation

For making suggestions and/or requests for new features you'd like added to EViews.

Moderators: EViews Gareth, EViews Moderator

farrel
Posts: 108
Joined: Thu Sep 18, 2008 11:13 pm

Possibility to create group of "depends" variables from equation

Postby farrel » Wed Jan 22, 2020 8:48 am

Dear Eviews,

I would suggest to create function, which would create a group of variables from equation on which this group depends. This is sort of a mix of functions "makeregs" and "@depends". What I mean?
Assume you have an equation:

equation1.ls INFLATION INFLATION(-1) INFLATION(-2) CRUDEOIL CRUDEOIL(-1) CRUDEOIL(-2) @during("2008m12") @trend

New function, let's call it "makedepends", would create a group of the following variables: INFLATION CRUDEOIL @during("2008m12") @trend
i.e. only those variables, on which equation depends on!

Unlike "makeregs" function, new function eliminates all possible lags. (Imagine rich ARDL model, which determines lags automatically, and using programming it's difficult to extract only variables which "makeregs" depends on)

Another way would be to use the function "@depends" in equation1 to extract variables on which this group depends on. For example, let's make group of regressors "mygroup", then make a string of depends using @depends and transform the string to a new group, as I show below:

equation1.makeregs mygroup
string mystring = mygroup.@depends
group group_{mystring}

But I find the function "@depends" a bit weird. Why?! because in case of equation1, the result would the following group:
group_inflation INFLATION INFLATION INFLATION CRUDEOIL CRUDEOIL CRUDEOIL @during("2008m12") @trend

I mean, why I need series INFLATION and CRUDEOIL 3xtimes in one group?!

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

Re: Possibility to create group of "depends" variables from equation

Postby EViews Gareth » Wed Jan 22, 2020 9:56 am

Neat idea.
Follow us on Twitter @IHSEViews

farrel
Posts: 108
Joined: Thu Sep 18, 2008 11:13 pm

Re: Possibility to create group of "depends" variables from equation

Postby farrel » Wed Jan 22, 2020 11:34 pm

EViews Gareth wrote:Neat idea.


But what about to implement?! :))

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

Re: Possibility to create group of "depends" variables from equation

Postby EViews Gareth » Thu Jan 23, 2020 7:02 am

It will be in the next major release
Follow us on Twitter @IHSEViews

farrel
Posts: 108
Joined: Thu Sep 18, 2008 11:13 pm

Re: Possibility to create group of

Postby farrel » Fri Jan 24, 2020 1:11 am

EViews Gareth wrote:It will be in the next major release


Gareth, thank you!

I have 2 more things in the same context. Gareth, could you please to have a look at this?

1. The FIRST

I have tried to extract series from the "makeregs" group and then using @depends function to obtain series, but something doesn't work. Look at the following code using "equation1" from the post above:

Code: Select all

{%equation}.makeregs gr_regs       ' make regressors group
%str_regs = gr_regs.@depends          ' create string of dependent vars
group gr_{%str_regs}               ' create a group of dependent vars
%depreg = gr_{%str_regs}.@seriesname(1)   ' make a string of the first series in the group of dep.vars
show {%depreg}                'show the first variable in the group of dep.vars


I expect this code to work, but it doesn't. Eviews says that there is an error in "%depreg" (row 4), the string cannot be compiled. But to me, the code seems ok and should work ...

2. The SECOND

About the sequence of variables in the output of ARDL model. Assume ARDL model:

Code: Select all

EQ1.ardl(fixed, deplags=2, reglags=1) LOG(HICP) LOG(WAGESA) LOG(FOOD) @DURING("2005m07")


The sequence of variables in the ouput is the following (and the same sequence using makeregs function):
LOG(HICP) LOG(HICP(-1)) LOG(HICP(-2)) LOG(WAGESA) LOG(WAGESA(-1)) LOG(FOOD) LOG(FOOD(-1)) @DURING("2005m07")

Everything is fine. The sequence of variables is the same in both equation and output.

But if I define EQ1 with fixed lags using @fl() function the sequence of variables changes. Here is equation:

Code: Select all

EQ1.ardl(fixed, deplags=2, reglags=1) LOG(HICP) @FL(LOG(WAGESA),0) LOG(FOOD) @DURING("2005m07")


and here output (or the group using makeregs):
LOG(HICP) LOG(HICP(-1)) LOG(HICP(-2)) LOG(FOOD) LOG(FOOD(-1)) LOG(WAGESA) @DURING("2005m07")

Note that using @fl() function, the variable LOG(WAGESA) goes after LOG(FOOD).
From programming point of view it's disappointing, so I cannot keep the sequence ov variables defining equation and defining the group of variables in this equation.
Is it possibel to fix it?

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

Re: Possibility to create group of "depends" variables from equation

Postby EViews Gareth » Fri Jan 24, 2020 6:06 am

1) %str_regs has a space in it, so can't be used as a variable name.
2) Unfortunately not.
Follow us on Twitter @IHSEViews

farrel
Posts: 108
Joined: Thu Sep 18, 2008 11:13 pm

Re: Possibility to create group of "depends" variables from equation

Postby farrel » Mon Jan 27, 2020 2:50 am

1) OK I see. I overcome it by using string vector and split string in parts.
2) I hope a new "makedepends" function will fix it ...

farrel
Posts: 108
Joined: Thu Sep 18, 2008 11:13 pm

Re: Possibility to create group of

Postby farrel » Tue Jun 29, 2021 3:46 am

EViews Gareth wrote:It will be in the next major release


Gareth, have you managed to introduce this function in Eviews12 we talked a year ago?

Andrejs

farrel
Posts: 108
Joined: Thu Sep 18, 2008 11:13 pm

Re: Possibility to create group of "depends" variables from equation

Postby farrel » Tue Jun 29, 2021 2:16 pm

Is it still in a pipeline?

Andrejs

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

Re: Possibility to create group of "depends" variables from equation

Postby EViews Gareth » Tue Jun 29, 2021 3:19 pm

Actually, I take it back - it is in EViews 12.

Code: Select all

eqname.@depends
Follow us on Twitter @IHSEViews

farrel
Posts: 108
Joined: Thu Sep 18, 2008 11:13 pm

Re: Possibility to create group of "depends" variables from equation

Postby farrel » Tue Jun 29, 2021 11:56 pm

Great. thanks!
Even though the function doesn't reflect dummies [@during()] and trend (@trend). I would add them.


Return to “Suggestions and Requests”

Who is online

Users browsing this forum: No registered users and 9 guests