Hello,
I am using strings to create a vector of variables that are run as separate dependent variables in separate regressions that are restimated and forecast. The problem I am running into is that the variables have a code key at the beginning that must be used in the original string creation. But later, I must do a multiplication with another series that has identical names, but does not have the code key at the beginning of the variable name.
Everything works in this code except the second to last line because the series vol* does not have "ab_" in the names. Is there anyway to remove the "ab_" from the string inside the loop in such a way that I could run this? I imagine there are a few ways to approach this problem, but I'll add that this is being run on over 300 regressions and in three loops because EViews his some type of limit on the number of variables could use in the initial for statement. So I am looking for (hopefully) a simple solution.
%indoor = @wlookup("ab_indoor*", "series")
%outdoor = @wlookup("ab_outdoor*", "series")
for %key {%indoor} {%outdoor}
equation eq_{%key}.stepls {%key} c @ {%key}(-1) {%eqvar}
forecast f_{%key}
genr clk_{%key}=f_{%key}*vol_{%key}
next
Thanks!
PacNW
Removing characters from a predefined string
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Re: Removing characters from a predefined string
As a followup, I did try and use the @mid function on the current string to create a new string with a new name to use inside the loop, but EViews would not allow me to use the function on the string.
Re: Removing characters from a predefined string
I believe that I have figured it out, you may ignore this thread :D
Who is online
Users browsing this forum: No registered users and 0 guests
