Page 1 of 1

Frechet distribution

Posted: Fri May 25, 2018 4:51 pm
by lorenzo.cioni
Hi
is there any way to simulate in Vensim a Frechet distibution with parameters alpha or shape and beta or scale?
Lorenzo

Re: Frechet distribution

Posted: Fri May 25, 2018 5:08 pm
by LAUJJL
Hi

If you type Fréchet distribution in google, Wikipédia explains how to get a Fréchet distribution from the uniform (0,1) distribution.

Regards.

JJ

Re: Frechet distribution

Posted: Fri May 25, 2018 9:21 pm
by lorenzo.cioni
LAUJJL wrote:Hi

If you type Fréchet distribution in google, Wikipédia explains how to get a Fréchet distribution from the uniform (0,1) distribution.

Regards.

JJ
Hi JJ
thanks a lot.
Lorenzo

Re: Frechet distribution

Posted: Fri May 25, 2018 9:21 pm
by lorenzo.cioni
LAUJJL wrote:Hi

If you type Fréchet distribution in google, Wikipédia explains how to get a Fréchet distribution from the uniform (0,1) distribution.

Regards.

JJ
Hi JJ
thanks a lot.
Lorenzo

Re: Frechet distribution

Posted: Sat May 26, 2018 8:19 pm
by lorenzo.cioni
Hi JJ
the implementation in Vensim as
betaScale*(-LOG(X , 10 ))^(-1/alphaShape)
with X as RANDOM UNIFORM(0, 1, 0) is not robust since if X is about 1 (for instance 0.999223) I get a value of 5.32112e+006
Any idea?
All the best.
Lorenzo

Re: Frechet distribution

Posted: Sun May 27, 2018 5:12 pm
by tomfid
It should be LN, not Log10. But apart from that, it is after all an extreme value distribution, so I would expect large values when you're very close to the right tail.

Re: Frechet distribution

Posted: Mon May 28, 2018 8:19 am
by LAUJJL
Hi lorenzo.

When one uses analytical formulations, one is often faced with lack of extreme conditions applicability.

There are several ways to deal with these problems.

The first one is to replace the analytical formulation by a lookup function, that is more correct but less practical, especially if one wants to change the shape of the function

Another solution is to replace the tail formulations by another one more appropriate by for instance adding a correction when the conditions become extreme. Doing this one must take care, that the distribution may no more correspond to a probability when cumulating the distribution. One must then normalize the distribution corrected so that the cumulation is again equal to 1. This will probably affect very slightly the original values in no extreme conditions. Another pitfall is that the formulation may no more be derivable at the point where the correction starts, because one needs a correction that is equal to 0, when in no extreme conditions, and then starts the correction accordingly, this may be not easy to achieve. But being not derivable in extreme conditions, will have consequences only if one looks for some optimum that is rarely near the extremes. An optimum is generally not far from the average.

Another solution is not to correct anything, but to restrict the boundaries of the model parameters, avoiding extreme conditions and defining precisely the conditions for the model to be valid.

One can in this case, build a reality check that will be triggered if the conditions are no more met.

I would still prefer the second solution to the third one that may be dangerous if not used with extreme care: restricting the extreme conditions, may hide other bugs (structural or equations) that would appear when these extreme conditions are met. Of course these additional bugs may be more or less misleading in no extreme conditions. Some bugs are not really important in normal conditions of use and become really misleading only in extreme conditions. But is it a reason to tolerate bugs as it is 'partially' admitted by the profession?

Regards.

JJ