Core variable of transformation

For questions regarding programming in the EViews programming language.

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

MOG
Posts: 21
Joined: Sun Aug 25, 2013 6:42 am

Core variable of transformation

Postby MOG » Thu Feb 26, 2015 2:02 am

Hi,

Is there a general way to retrieve the core variable of a transformation, say find x in Dlog(x).

Regards
Martin

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Core variable of transformation

Postby EViews Glenn » Thu Feb 26, 2015 12:46 pm

I assume you mean if the series is already coded and you don't have the original series? As in, you've received a series Y which has in it DLOG(Y).
If so, you'll just have to use knowledge of the original transformation to undo it.
If not, I'm afraid that I don't understand the question.

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Core variable of transformation

Postby trubador » Sat Feb 28, 2015 2:37 pm

As far as I understand, it is about reaching out the name of the variable that is transformed. Suppose the user inputs @dnorm(log(yvar)). Indeed it would very be useful to have a practical way to extract the name of the variable in such cases.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Core variable of transformation

Postby EViews Glenn » Sat Feb 28, 2015 8:44 pm

Interesting, but I'm still not sure I understand...Couple of questions that would help me.

What would you want to get from

dlog(@cnorm(y + x))

and

dlog(@cnorm(x + y))

And in what context would this operation be done? At the time the user inputs the expression? In that case, wouldn't the user know better what they want than us?

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Core variable of transformation

Postby trubador » Sun Mar 01, 2015 8:00 am

In your example, for instance, name of the series "y" and "x" would be the intended output. Suppose that I am trying to write an add-in that will take the input from user in terms of a number of series. And the user is allowed to enter series in a transformed fashion. I may need to pull out the names of the variables and put them into a group and then send it to my subroutine as an argument. And suppose EViews has such a feature called @varfind:

Code: Select all

%list = "@dlog(yvar) @logit(xvar)" %varnames = @varfind(%list) group gr.add {%varnames}
Group gr is expected to include yvar and xvar series. The function handle (@) could be exploited here, but I am not sure if it can be generalized.
Another example would be the equations. In some cases, the problem of pulling out the variable names makes it very difficult (if not impossible) to take equations as user inputs and exploit it when writing add-ins.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Core variable of transformation

Postby EViews Glenn » Mon Mar 02, 2015 12:13 pm

Ah. I wasn't sure if you wanted X or Y in my example. You want both.

We should be able to add a function that would return a string containing all of the names of series referenced in a list or the series referenced in a group. And one that could do the same for an equation. I don't think that database or other references would cause too much trouble. If there are formulae, there might be an issue seeing into the expression, but we'll see.

I think it's a good idea. I'll put it on the list. But is this what the OP wanted?

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Core variable of transformation

Postby trubador » Mon Mar 02, 2015 1:51 pm

This is truly what I understand from his post. It seems he is looking for a general way to retrieve untransformed variable without having to reverse the formula each time.

MOG
Posts: 21
Joined: Sun Aug 25, 2013 6:42 am

Re: Core variable of transformation

Postby MOG » Fri Mar 27, 2015 9:40 am

This would be exactly what I'm looking for. As alreday pointed out, it would be very useful when writing add-ins and subroutines.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Core variable of transformation

Postby EViews Glenn » Fri Apr 10, 2015 2:34 pm

The latest patch of EViews 9 offers two new data members:

Code: Select all

series.@depends group.@depends
that return a string containing the names of all of the series in the current workfile page on which the series or group depends. Note that this includes all of the series in expressions in the group as well as series contained in frml objects. Not included are series for page or database links. A bit of a bonus thanks to our forum members.

The documentation for EViews 9 will be updated to reflect these new data members.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests