Random and Exogenous Variation in the Model

FormulaDistribution

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

f(x)=.5 f_1(x) + .5 f_2(x)
where f_1(x) is exponential with parameter \lambda, and f_2(x) is uniform. Figure 7.6 shows a portion of the four windows needed to express this.

cpformul.gif (14073 bytes)

Figure 7.6: An Example of a Mixture Distribution

The bottom window is the FormulaDistribution Formula window, and it contains the conditional element conditil image. Editing this element provides you with the capability to specify the condition conditio image. If the condition evaluates to TRUE, it returns the formula in the True Expression window formular image, which is the appropriate exponential random variable; if it evaluates to FALSE, it returns the formula in the False Expression window formular image, which is the uniform random variable.

Previous Page | Next Page | Top of Page