|
Chapter Contents |
Previous |
Next |
| The MODEL Procedure |
The following is a brief summary of SAS functions useful for defining models. Additional functions and details are in SAS Language: Reference. Information on creating new functions can be found in SAS/TOOLKIT Software: Usage and Reference, chapter 15, "Writing a SAS Function or Call Routine."
The MODEL procedure provides several functions for generating random numbers for Monte Carlo simulation. These functions use the same generators as the corresponding SAS DATA step functions.
The following random-number functions are supported: RANBIN, RANCAU, RANEXP, RANGAM, RANNOR, RANPOI, RANTBL, RANTRI, and RANUNI. For more information, refer to SAS Language: Reference.
Each reference to a random-number function sets up a separate pseudo-random sequence. Note that this means that two calls to the same random function with the same seed produce identical results. This is different from the behavior of the random-number functions used in the SAS DATA step. For example, the statements
x=rannor(123); y=rannor(123); z=rannor(567);
produce identical values for X and Y, but Z is from an independent pseudo-random sequence.
For FIT tasks, all random-number functions always return 0. For SOLVE tasks, when Monte Carlo simulation is requested, a random-number function computes a new random number on the first iteration for an observation (if it is executed on that iteration) and returns that same value for all later iterations of that observation. When Monte Carlo simulation is not requested, random-number functions always return 0.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.