SIMSYSTEM Procedure
Simulation from Families of Distributions
Because the actual distribution of an input variable is generally unknown, the reliability of a simulation study rests on sampling from distributions that represent a broad set of realistic scenarios. Well-designed simulation studies sample from a range of parametric distributions that have different means, standard deviations, and shapes. In studies of this type, you typically select several families of distributions to sample from, and then you specify the mathematical parameters for particular distributions within each family.
For example, if your goal is to model the effects of nonnormality on a statistical method, you might simulate data from various lognormal distributions to allow for different degrees of skewness, and you might simulate data from various t distributions to allow for distribution tails that are heavier than those of the normal distribution. The following statements illustrate how you carry this out with the RAND function in the DATA step:
data SimNonNormal(drop=i);
call streaminit(15531);
do i=1 to 10000;
normal = rand('NORMAL');
t_4 = rand('T', 4);
t_10 = rand('T', 10);
lognormal_0_2 = rand('LOGNORMAL', 0, 0.2);
lognormal_0_4 = rand('LOGNORMAL', 0, 0.4);
output;
end;
run;
Note that for each distribution in the t family you must specify its degrees of freedom (in this case, the values 4 and 10). Likewise, for each distribution in the lognormal family you must specify a shape parameter (in this case, the values 0.2 and 0.4).
When using the RAND function you must choose both a distribution family and the mathematical parameters for the distributions in that family. This approach has three major disadvantages:
The choice of a family is generally not obvious. In some applications the choice is well established; for example, the lognormal and Weibull families are commonly chosen for simulating lifetime distributions in reliability analysis. However, in most applications the family is chosen in an ad hoc manner.
The parameter choices are nonintuitive. Generally, the most useful descriptors of a distribution—in particular, its mean, standard deviation, skewness, and kurtosis—are complicated mathematical functions of the parameters. For example, the skewness of a lognormal distribution with parameter
is
. This makes it difficult to simulate data by specifying the descriptors of this distribution.
It is computationally challenging to simulate data from distributions with a broad combinations of skewness and kurtosis because the families available in the RAND function—and distribution families in general—cover only a subset of the combinations that are feasible.
You can avoid these disadvantages by using the SIMSYSTEM procedure.