Is there any way to automate creation of the list of variable overrides in model scenarios? What I would like to do is specify a list of exogenous regressors in a var model that are autoatically included as scenario overrides
group exog_reg u v w
var myvar.ls 1 2 x y z @ c q2 q4 exog_reg
myvar.makemodel(mymod)
mymod.scenario(n,a="_s1")
mymod.override u v w
mymod.solve
Specifically, how can I automate the line
mymod.override u v w
so that it reads the overrides directly from the group exog_reg?
I've tried
mymod.override exog_reg
for !i = 1 to exog_reg.@count
mymod.override(m) exog_reg.@seriesname(!i)
next !i
for !i = 1 to exog_reg.@count
%oride = exog_reg.@seriesname(!i)
mymod.override(m) %oride
next !i
but none of these solutions work. Would an alpha lsit or a table do the trick? Or, is there no way to pass a list of variables to a scenario override without having to hardcode it?
Automating Overrides
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Automating Overrides
Without trying it myself, I'd be surprised if:
didn't work.
Code: Select all
for !i = 1 to exog_reg.@count
%oride = exog_reg.@seriesname(!i)
mymod.override(m) {%oride}
next !i
didn't work.
Follow us on Twitter @IHSEViews
Re: Automating Overrides
Thanks Gareth! That worked, And DOH! to me for forgetting the braces...
Who is online
Users browsing this forum: No registered users and 39 guests