Hi, I have a question regarding addin factors.
Using the Macromod workfile in our Eviews manual as an example. Suppose I give the model (with three equations for CN, R, I and one identity) a name "lalatest", and in baseline scenario, I solved for the static solution
lalatest.scenario "baseline"
smpl 1960q1 1999q4
lalatest.solve(d=s, o=g)
And then I created a comparison scenario with a dynamic solution
lalatest.scenario(n) "comparison1"
lalatest.solve(d=d,o=g)
Obviously, the dynamic and static solutions are different, and I want to use the addin factors to make the "comparison 1" scenario dynamic solution the same as the baseline. Here is what I did:
lalatest.addassign(v) @all 'create addin factors
lalatest.control cn_a cn cn_0 'Solve for the addin factor for CN
lalatest.control i_a i i_0 'Solve for the addin factor of I
lalatest.control r_a r r_0 'Solve for the add in factor for r
lalatest.control y_a y y_0 'Solve for the add in factor for y
lalatest.solve(d=d,o=g)
Unfortunately, it does not work. How can I make the solution of a model, with interactive equations in the model, equal to a set of trajectories? Thank you for your help!
Solving for the addin factors for a group of trajectories
Moderators: EViews Gareth, EViews Moderator

 EViews Developer
 Posts: 161
 Joined: Wed Sep 17, 2008 10:39 am
Re: Solving for the addin factors for a group of trajectories
I think the following approach will do what you asked for, although I'm not entirely sure what you're trying to achieve.
Try out the code below and see what you think.
Try out the code below and see what you think.
Code: Select all
lalatest.scenario "baseline"
smpl 1960q1 1999q4
lalatest.solve(d=s, o=g)
'create a comparison scenario with a dynamic solution
lalatest.scenario(n) "comparison1"
lalatest.solve(d=d,o=g)
'obviously, the dynamic and static solutions are different, and I want to use the addin factors to make the "comparison 1" scenario dynamic solution the same as the baseline
lalatest.addassign(v) @all 'create addin factors
'back up actuals
copy cn cnb
copy i ib
copy r rb
copy y yb
'overwrite actuals with scenario 1
cn = cn_0
i = i_0
r = r_0
y = y_0
'solve for add factors
lalatest.addinit(v=n) @stochastic
'restore actuals
cn = cnb
i = ib
r = rb
y = yb
'solve with add factors
lalatest.solve(d=d,o=g)
'show results: cn_2 should equal cn_0
show cn cn_0 cn_a cn_2
Re: Solving for the addin factors for a group of trajectories
Cool! It worked perfectly. You saved me a lot of time. Thanks!
Who is online
Users browsing this forum: No registered users and 1 guest