The MODEL Procedure |
Mathematical Functions |
The following is a brief summary of SAS functions that are useful for defining models. Additional functions and details are in SAS Language: Reference. Information about creating new functions can be found in SAS/BASE Software: Procedure Reference, Chapter 18, "The FCMP Procedure."
the cosine of x; x is in radians.
the hyperbolic cosine of x
e
the natural logarithm of x
the log base ten of x
the log base two of x
the sine of x; x is in radians.
the hyperbolic sine of x
the square root of x
the tangent of x; x is in radians and is not an odd multiple of .
the hyperbolic tangent of x
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, RAND, 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 following statements produce identical values for X and Y, but Z is from an independent pseudo-random sequence:
x=rannor(123); y=rannor(123); z=rannor(567); q=rand('BETA', 1, 12 );
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.
Copyright © SAS Institute, Inc. All Rights Reserved.