Error Messages/42728


Example Error Message

The result computed by the Function Elasticity is unreliable because the Function Normal, called from 'Appreciation', produces random values. Because 'Appreciation' is downstream from 'Inflation', this is likely to cause a misleading random fluctuation when Function Elasticity explores changes to the value of 'Inflation'.  Other distribution function call(s) also appear in 'Maintenance' and 'Insurance'.

Cause

The sensitivity functions Elasticity and Dydx compute their results using finite differencing. For example, Dydx(f(x), x) evaluates f(x) and f(x + delta) for a very small value delta. The problem flagged by this warning arises when f(x) involves a random number, thus making the result of f(x) random. A non-random continuous function will usually see a small change from f(x) to f(x + delta) for a small delta, but when the result is random, f(x) is no longer continuous.

To illustrate this, consider a simple example:

Variable ub := 10;
Chance y := Uniform(0,ub)
Variable sens := Dydx(y, ub)

In this example, when y is evaluated as a distribution, its Sample is a list of numbers between 0 and 10. For example, it might happen that y[Run = 1] is 4.415. When Dydx is evaluates, it sets ub to 10.000001 and evaluates y. The random number generator spits out a new random number, this time between 0 and 10.000001, say y[Run = 1] equal to 8.731. With these random numbers, a very large change occurred in the result from the very small change to ub, so that the slope appears to be (8.731-4.415)/0.000001 = 4.316M.

Remedy

You should never perform a Dydx or Elasticity sensitivity analysis on a model that has a distribution function downstream from the sensitivity input variable.

Distribution (or Random) functions are not a problem when the distribution function is not downstream from the sensitivity input variable. Consider the following reformulation of the above example:

Variable ub := 10
Chance u := Uniform(0, 1)
Variable y := u*ub
Variable sens := Dydx(y, ub)

The computation of y is equivalent to the first example, but the problem with randomness does not occur because the chance variable u is not downstream from ub. Suppose the random sample has u[Run = 1] equal to 0.4415, so that y[Run = 1] is 4.415 as before. When Dydx evaluates y with ub := 10.000001, y change by only 0.000004415, so that its derivative is 0.4415 -- a stable number, and not subject to randomness.

See Also

Comments


You are not allowed to post comments.