Learn R Programming

pgnorm (version 2.0)

zigsetup: A function for setting up the Ziggurat.

Description

The function approximates the rightmost x-coordinates of the first n-1 rectangles defining the Ziggurat in case of the central, $p$-generalized normal distribution.

Usage

zigsetup(p, n, tol)

Arguments

p
A positive number expressing the form parameter of the distribution. The default is 2. In case of the Ziggurat method, p can be chosen from $(1, \infty) \cup \{ 0.25, 0.45, 0.5, 0.6, 0.75 \} $.
n
The number of rectangles that build up the Ziggurat. The default is $2^8$.
tol
A positive number expressing the approximation accuracy of the function. The default is $10^{-9}$.

Value

$(n-1)$-dimensional, real vector.

References

S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.