| Random and Exogenous Variation in the Model |
QSIM provides a general function writing capability with the FormulaDistribution selection, shown in the list box in Figure 7.1. After you select it and then click the Parameters button, a Formula Manager window (as shown in Figure 5.1) is displayed. From this window, you can write a function that returns a number that is used as the sample. For example, suppose you wanted a mixture distribution with density function
|
Figure 7.6: An Example of a Mixture Distribution
The bottom window is the FormulaDistribution Formula window,
and it contains the conditional element
.
Editing this element provides you with the capability to
specify the condition
.
If the condition evaluates to TRUE, it returns
the formula in the True Expression window
,
which is the appropriate exponential random variable; if it
evaluates to FALSE, it returns the formula
in the False Expression window
,
which is the uniform random variable.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.