Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
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 6.1. After you select it and then click the Parameters button, a Formula Manager window (as shown in Figure 4.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 f1(x) + .5 f2(x)
where f1(x) is exponential with parameter \lambda, and f2(x) is uniform. Figure 4.1 shows a portion of the four windows needed to express this.

cpformul.gif (14073 bytes)

Figure 6.6: An Example of a Mixture Distribution

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

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.