Sensitivity analysis help

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

Moderators: EViews Gareth, EViews Moderator

DarioL
Posts: 2
Joined: Mon Aug 29, 2022 4:10 am

Sensitivity analysis help

Postby DarioL » Tue Aug 30, 2022 12:49 am

Hi,

I have built a macroeconomic model on EViews 12 and am trying to run some sensitivity analyses to understand the influence of the main exogenous parameters on the results of the model. I know that I can manually change the values of the parameters in different scenarios, but was wondering whether EViews is able to do this automatically.

More specifically, I would like to give an interval of values to an exogenous parameter A and let EViews draw from that interval and run different simulations, one for each value of parameter A.

Apologies if this is a naive question, but I have not found any thread related to this issue on the forum!

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

Re: Sensitivity analysis help

Postby EViews Gareth » Tue Aug 30, 2022 8:23 am

This is not built in, no. But writing a for loop in an EViews program is possible.
Follow us on Twitter @IHSEViews

DarioL
Posts: 2
Joined: Mon Aug 29, 2022 4:10 am

Re: Sensitivity analysis help

Postby DarioL » Wed Aug 31, 2022 5:06 am

Hi Gareth,

Thanks for your reply. I have partly addressed the problem, but I still have a question.

I tried something like this:

for !i = 1 to 15
model_name.scenario(a= !i) "scenario 1"
smpl 2010 @last
investment_sensitivity = y(!i)
smpl 2028 @last
model_name.solve(i=p, o=b)
next


Where y is a vector of random values.

In this way, EViews solves for 15 scenarios, but it then actually considers only scenario 1 as the only alternative scenario, i.e. each new scenario overrides the value of the past scenario. So although I have 16 aliased variables (from _0 to _15), there are only baseline scenario and scenario 1. How can I name each scenario as scenario 1, scenario 2 etc... within the for loop? If I try:

for !i = 1 to 15
model_name.scenario(a= !i) "scenario !i"


I receive the error message "Scenario not found". Any idea?

Many thanks for your help!


Return to “Models”

Who is online

Users browsing this forum: No registered users and 12 guests