Elasticity


Elasticity(y,x)

Returns the percent change in the expression «y» caused by a 1% change in a dependent variable «x». Mathematically, writing y(x) to emphasize that «y» is a function of «x», elasticity is defined as:

Elasticity equation.png

When «x» is a positive scalar, but not when «x» is array-valued (and hence, not an uncertain quantity, which would be indexed by Run), Elasticity() is related to Dydx() in the following manner:

Elasticity(y,x) = Dydx(y,x) * (x/y)

Library

Special Functions

Evaluation Modes

When you evaluate Elasticity(y,x) in mid-mode, the mid-value of «x» is varied and the mid-value of «y» is evaluated. In sample-mode, the sample value for «x» is varied and the sample result for «y» is computed in sample-mode. Therefore, when «y» is a statistical function of «x», care must be taken to ensue that the evaluation modes for «y» and «x» correspond. See Dydx for further discussion of this point.

In Analytica 4.1 and earlier, Elasticity(y,x) cannnot be used when the definition of «x» contains a probability distribution or other random element. When used in such a case, the result appears random and nonsensical in the sample-mode. When you want to use Elasticity on an uncertain quantity «x», separate the random part (the distribution) into a separate parent variable of «x» (so that the particular random sample is cached), and the desired result will be correctly obtained.

In Analytica 4.2 and later, Elasticity can be used when «x»'s definition contains a probability distribution or other random element, provided that the «x»'s caching method is configured as the default cache-always (which it will be as long as you haven't explicitly gone out of your way to configure it differently).

Numeric Delta

To compute the elasticity, Elasticity() varies «x» by a small amount, by default the multiple (1 + 1.0e-8). In the rare event of unusual numeric complications, this multiple can be controlled using the optional parameter «delta», e.g.:

Dydx(y,x,delta:1.0e-2)

In the equation above that defines Elasticity(y,x), «delta» is essentially the value for u that is used in the numeric evaluation.

Preservation of computed values

New in Analytica 4.2

In Analytica 4.1 and earlier, evaluation of Elasticity(y,x) causes any previously computed results that are downstream of «x» to become invalidated. Analytica 4.2 preserves previously computed values throughout the model. In rare situations, if your model consumes nearly all available memory and you'd rather allow previously computed values to be dropped while computing Elasticity, you can specify the optional parameter «preserve» to be false, e.g.:

Elasticity(Y,X,preserve:false)

Of course, when you need to view other results that had been previously cached, they will need to be recomputed again, and probability distributions will need to be re-sampled.


See Also

Comments


You are not allowed to post comments.