Possibility to create group of "depends" variables from equation
Posted: 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?!
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?!