Page 1 of 1

Sensitivity analysis help

Posted: Tue Aug 30, 2022 12:49 am
by DarioL
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!

Re: Sensitivity analysis help

Posted: Tue Aug 30, 2022 8:23 am
by EViews Gareth
This is not built in, no. But writing a for loop in an EViews program is possible.

Re: Sensitivity analysis help

Posted: Wed Aug 31, 2022 5:06 am
by DarioL
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!