Couldn't find any hint about w{} on eviews documents. Any explanation?
w{}(), can't understand how it works.
BTW, how can I print a single variable to command window not print it to a file?
Thanks!
Couldn't find any hint about w{} on eviews documents. Any explanation?
w{}(), can't understand how it works.
BTW, how can I print a single variable to command window not print it to a file?
Thanks!
On
{} can change a variables value (in programming not series) to string. For example if there is WTR, WCR, KJ and Y series in our file, following command would be run.
%A = "TR"
!i=2
ls Y c W{%A}(!i+1)
Means ls Y c WTR(3) and also
%A = "TR"
%B= "CR"
%F="KJ"
!i=3
!k=-1
ls Y c W{%A}(!i+1) W{%B}(!k-3) {%F}
Means ls Y c WTR(4) WCR(-4) KJ
Curly braces in EViews work the way that statements like
eval()perform in other programming languages. They tell EViews "strip quotes off of this string and evaluate it as valid EViews code".%Ais a "program string", a temporary string variable only used when executing an EViews program.!iis a "program scalar", a temporary scalar variable only used when executing an EViews program.It's hard to answer your question without knowing what type of object
W{%A}is supposed to be. But if%Aholds a value likeUSA, for example,W{%A}will look for an object in your workfile calledWUSA. If!iholds the value1, for example,W{%A}(!i+1)is equivalent toWUSA(2). This could, for example, be an attempt to grab a particular element of a vector object.