
408 Statistical Programming in SAS
11.8 Case Study 4: SAS/IML Module to Implement
Monte Carlo Integration to Estimate π
In all of the previous examples, SAS/IML code was specific to one particular problem.
However, you might want to produce code that can be applied in other contexts. In
Display 11.14, SAS/IML modules are constructed using the techniques in “Case Study 1:
Monte Carlo Integration to Estimate π.” The beginning of a module is noted by start
module-name(parm1, parm2, …). Its conclusion is noted by finish
module-name. Modules are invoked by run module-name(parm1, parm2,
…), where a value is substituted for parm in the run statem ...