Adding and initializing add factors

For technical support, tips and tricks, suggestions, or any other information regarding the EViews model object.

Moderators: EViews Gareth, EViews Moderator

jhkemp
Posts: 2
Joined: Mon Nov 29, 2010 2:52 am

Adding and initializing add factors

Postby jhkemp » Tue Nov 30, 2010 12:53 am

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?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13313
Joined: Tue Sep 16, 2008 5:38 pm

Re: Adding and initializing add factors

Postby EViews Gareth » Tue Nov 30, 2010 9:03 am

If I run the following:

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


Return to “Models”

Who is online

Users browsing this forum: No registered users and 9 guests