Using Discrete Distributions in Sensitivity Analysis

Use this forum to post Vensim related questions.
Post Reply
YahyaRafique
Junior Member
Posts: 13
Joined: Mon Mar 29, 2010 4:28 am

Using Discrete Distributions in Sensitivity Analysis

Post by YahyaRafique »

Dear all,

I am trying to run a sensitivity analysis where some of the parameter I am using a discrete distribution rather than a continuous one.

for example I want a discrete random uniform distribution in the range [30,60] that select whole numbers only like 32,48,51 etc.

How would I do this for a parameter in a multivariate sensitivity analysis?

Thank you in advance...

YR
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

You will need to take the parameters and pass them through the INTEGER function in the model. eg if you had

constant = 1

you would need to have

constant = INIT(INTEGER(constant input))
constant input = 1

then run the sensitivity on constant input. Note the INIT function is just an efficiency thing that prevents the equation for constant from being computed at all times.
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

INIT = INITIAL

INITIAL always has to appear first in an equation. I sometimes add an INIT macro to my models, so that I can write things like relativeX = x/INIT(x)

:MACRO: INIT(x)
INIT = INITIAL(x)
~ x
~ |

:END OF MACRO:
YahyaRafique
Junior Member
Posts: 13
Joined: Mon Mar 29, 2010 4:28 am

Post by YahyaRafique »

Thanks guys..
YahyaRafique
Junior Member
Posts: 13
Joined: Mon Mar 29, 2010 4:28 am

Post by YahyaRafique »

But how would I round to one decimal place...


I am trying to use a beta distribution and want to round generated values between O and 1 to to one decimal place..thanks in advance
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

Use INTEGER(x*10+0.5)/10
Post Reply