Hi,
I want to add add-factors to a model object. I am using the following code:\
eq_{%0}_{%2}.makemodel(model{%0})
model{%0}.addassign(v) {%0}
model{%0}.addinit(v=n, s=b) {%0}
model{%0}.solveopt(s=d, d=d, a=t )
model{%0}.scenario(a) "Scenario 1"
model{%0}.scenario scenario 1
model{%0}.override {%1}
model{%0}.scenario baseline
solve model{%0}
where the %0 and %1 are arguments passed to the program in which this code is nested.
When calling the program, the add factors are not assigned or initialized. Any suggestions?
Adding and initializing add factors
Moderators: EViews Gareth, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Adding and initializing add factors
If I run the following:
Then add-factors are being assigned. I think this is identical to what you're doing.
Code: Select all
create u 100
series x=nrnd
series x_1 = x+3
series y=nrnd
series w=nrnd
equation eq_y_2.ls y c x w
%0="y"
%1="x"
%2="2"
eq_{%0}_{%2}.makemodel(model{%0})
model{%0}.addassign(v) {%0}
model{%0}.addinit(v=n, s=b) {%0}
model{%0}.solveopt(s=d, d=d, a=t )
model{%0}.scenario(a) "Scenario 1"
model{%0}.scenario scenario 1
model{%0}.override {%1}
model{%0}.scenario baseline
solve model{%0}
Then add-factors are being assigned. I think this is identical to what you're doing.
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 21 guests