I am trying to run a VEC regression in a program, but it doesn't recognize the options trend and n coming from a chosen string and scalar, respectively. I am using the specification var_name.ec(trend,n) lags_pair endog_list [@ exog_list] in the folowwing form:
var eval1.ec(%b,datostrings(1,3)) 1 2 log(a0_sa) log(a1_sa) log(a2_sa) ' log(a"@str(datostrings(1,8))"_sa)
where %b is the string variable coming from the following criteria:
if datostrings(1,2)=1 then %b="a"
endif
if datostrings(1,2)=2 then %b="b"
endif
if datostrings(1,2)=3 then %b="c"
endif
if datostrings(1,2)=4 then %b="d"
endif
if datostrings(1,2)=5 then %b="e"
endif
and where datostrings(1,3) is an specif scalar in the matrix datostrings I am using.
I believe this specification is correct but when I run the program the VEC runned by eviews uses trend=c and n=1 by default.
When I run the programm using "Version 4 compatible variable substitution and program boolean comparison" it solves the problem for the option trend but not for n (numbers of contaigrating)
Running VEC - string and scalar recognition problems
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13583
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Running VEC - string and scalar recognition problems
Put %b in braces, and put your scalar variable in a ! variable before putting it in the command.
Re: Running VEC - string and scalar recognition problems
Thank you Gareth, it is working now.
One more question:
In my specification var eval1.ec({%b},!bbbb) 1 2 log(a0_sa) log(a1_sa) log(a2_sa) ' log(a"@str(datostrings(1,8))"_sa)
as you can see I am trying to add as an explanatory variable log(a"@str(datostrings(1,8))"_sa) which I pretend it to be log(a4_sa), where the string 4 comes from the datostrings matrix.
I have tried several other ways of doing it but I can't make it work (for instance I have also created strings for the whole matrix).
Could help me with this. Thank you Gareth!
One more question:
In my specification var eval1.ec({%b},!bbbb) 1 2 log(a0_sa) log(a1_sa) log(a2_sa) ' log(a"@str(datostrings(1,8))"_sa)
as you can see I am trying to add as an explanatory variable log(a"@str(datostrings(1,8))"_sa) which I pretend it to be log(a4_sa), where the string 4 comes from the datostrings matrix.
I have tried several other ways of doing it but I can't make it work (for instance I have also created strings for the whole matrix).
Could help me with this. Thank you Gareth!
Re: Running VEC - string and scalar recognition problems
I used %s=@str(datostrings(1,8)) and then log(a{%s}_sa) and it worked. Thank you.
Who is online
Users browsing this forum: No registered users and 2 guests
