RANPOI Function


Returns a random variate from a Poisson distribution

Category: Random Number

Tip: If you want to change the seed value during execution, you must use the CALL RANPOI routine instead of the RANPOI function.

Syntax

RANPOI ( seed,m )

Arguments

seed

  • is an integer. If seed 0, the time of day is used to initialize the seed stream.

  • Range: seed < 2 31 -1

  • See: 'Seed Values' on page 257 for more information about seed values

m

  • is a numeric mean parameter.

  • Range: m

Details

The RANPOI function returns a variate that is generated from a Poisson distribution with mean m . For m < 85, an inverse transform method applied to a RANUNI uniform variate is used (Fishman 1976) (See 'References' on page 926). For m 85, the normal approximation of a Poisson random variable is used. To expedite execution, internal variables are calculated only on initial calls (that is, with each new m ).

Comparisons

The CALL RANPOI routine, an alternative to the RANPOI function, gives greater control of the seed and random number streams.

See Also

Call routine:

'CALL RANPOI Routine' on page 377




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net