zigsetup: A function for setting up the Ziggurat.

Description Usage Arguments Value Author(s) References Examples

View source: R/zigsetup.R

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

1
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, ∞) \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

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

Author(s)

Steve Kalke

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.

Examples

1
 y<-zigsetup(3,20,10^(-6)) 

pgnorm documentation built on May 1, 2019, 7:55 p.m.