Hi,
I'm d
owloading a large number of data series from Haver in E-views, some of which are in million, some are in billions. This is indicated in the series description (for example: "Anguilla: Stock of Domestic Credit (Mil.XCD)". In my program, I need everything to be in billions to calculate a ratio.
I was trying to find a way to seach the description string and return a positive number if it contains "Mil" or "mil", 0 if it does not. I tried a combination of the @wfindnc and @description commands to do that, but it doesn't seem to be working (I always get 0, even on series I know are in millions).
%temp = seriesname.@description
!million = @wfindnc(%temp,"mil")
Any help on how to make this work?
Thanks,
Jerome
@wfindnc help
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: @wfindnc help
Code: Select all
%temp = seriesname.@description
!million = @wfindnc(%temp,"mil")>0 'will return 1 if the string contains "mil", 0 otherwise.
Re: @wfindnc help
Thanks, but it doesn't appear to be working on the series I'm applying them too. The code always returns 0 no matter the value I put in between quotation marks ("mil", "Mil", "MIL").
I'm attaching the workfile containing a sample of the series I have, and the list of series where the description says the magnitude is in millions. Any help is greatly appreciated.
Thanks again.
Jérôme
I'm attaching the workfile containing a sample of the series I have, and the list of series where the description says the magnitude is in millions. Any help is greatly appreciated.
Thanks again.
Jérôme
-
EViews Esther
- EViews Developer
- Posts: 149
- Joined: Fri Sep 03, 2010 7:57 am
Re: @wfindnc help
The problem is that the term "Bil" cannot be separable from the string "(EOP, Bil.Pounds)". For instance, when you do
you will get !million=1.
Why don't you try this one instead?
Code: Select all
!million = @wfindnc(a112sodc,"(EOP, Bill.Pounds)")>0
Why don't you try this one instead?
Code: Select all
%temp = seriesname.@description
!million=@instr(%temp,"Mil")
Who is online
Users browsing this forum: No registered users and 2 guests
