Title: | The p-Generalized Normal Distribution |
---|---|
Description: | Evaluation of the pdf and the cdf of the univariate, noncentral, p-generalized normal distribution. Sampling from the univariate, noncentral, p-generalized normal distribution using either the p-generalized polar method, the p-generalized rejecting polar method, the Monty Python method, the Ziggurat method or the method of Nardon and Pianca. The package also includes routines for the simulation of the bivariate, p-generalized uniform distribution and the simulation of the corresponding angular distribution. |
Authors: | Steve Kalke |
Maintainer: | Steve Kalke <[email protected]> |
License: | GPL (>= 2) |
Version: | 2.0 |
Built: | 2024-12-01 08:37:54 UTC |
Source: | CRAN |
-Generalized Normal DistributionThe pgnorm-package includes routines to evaluate (cdf,pdf) and simulate the univariate -generalized normal distribution with form parameter
, expectation
and standard deviation
. The pdf of this distribution is given by
where and
, which becomes
if and
. The random number generation can be realized with one of five different simulation methods including the
-generalized polar method, the
-generalized rejecting polar method, the Monty Python method, the Ziggurat method and the method of Nardon and Pianca. Additionally to the simulation of the p-generalized normal distribution, the related
-generalized uniform distribution on the
-generalized unit circle and the corresponding angular distribution can be simulated by using the functions "rpgunif" and "rpgangular", respectively.
Package: | pgnorm |
Type: | Package |
Version: | 2.0 |
Date: | 2015-11-23 |
License: | GPL (>= 2) |
LazyLoad: | yes |
Steve Kalke <[email protected]>
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-rpgnorm(10,3)
y<-rpgnorm(10,3)
The dataset contains tail algorithm constants for sampling from the tail of the -generalized normal distribution in context of a simulation of the
-generalized normal distribution with the Monty Python method.
data(datasetpgnmp1)
data(datasetpgnmp1)
data(datasetpgnmp1)
data(datasetpgnmp1)
The dataset contains optimal rectangle widths in context of a simulation of the -generalized normal distribution with the Monty Python method.
data(datasetpgnmp2)
data(datasetpgnmp2)
data(datasetpgnmp2)
data(datasetpgnmp2)
The dataset contains tail algorithm constants for sampling from the tail of the -generalized normal distribution in context of a simulation of the
-generalized normal distribution with the Ziggurat method.
data(datasetpgnzig)
data(datasetpgnzig)
data(datasetpgnzig)
data(datasetpgnzig)
-generalized normal densityThe function evaluates the density of the univariate
-generalized normal distribution according to
where and
.
dpgnorm(y, p, mean, sigma)
dpgnorm(y, p, mean, sigma)
y |
The real argument of the function. |
p |
A positive number expressing the form parameter of the distribution. The default is 2. |
mean |
A real number expressing the expectation of the distribution. The default is 0. |
sigma |
A positive number expressing the standard deviation of the distribution. The default is |
A real number.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-dpgnorm(0,3,1,2)
y<-dpgnorm(0,3,1,2)
-generalized normal cdfThe function evaluates the cdf of the univariate -generalized normal distribution according to the density
where and
.
ppgnorm(y, p, mean, sigma)
ppgnorm(y, p, mean, sigma)
y |
A real number, the argument of the function. |
p |
A positive number expressing the form parameter of the distribution. The default is 2. |
mean |
A real number expressing the expectation of the distribution. The default is 0. |
sigma |
A positive number expressing the standard deviation of the distribution. The default is |
A real number.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-ppgnorm(2,p=3)
y<-ppgnorm(2,p=3)
The function simulates the univariate angular distribution corresponding to the -generalized uniform distribution on the
-generalized unit circle.
rpgangular(n,p)
rpgangular(n,p)
n |
The natural number of random variables to be simulated. |
p |
A positive number expressing the form parameter of the distribution. The default is 2. |
An -dimensional, real vector.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-rpgangular(10000,3)
y<-rpgangular(10000,3)
-generalized normal distributionThe function simulates the univariate -generalized normal distribution by using one of the following methods: the
-generalized polar method (pgenpolar), the
-generalized rejecting polar method (pgenpolarrej), the Monty Python method (montypython), the Ziggurat method (ziggurat) and the method of Nardon and Pianca (nardonpianca).
rpgnorm(n, p, mean, sigma, method)
rpgnorm(n, p, mean, sigma, method)
n |
The natural number of random variables to be simulated. |
p |
A positive number expressing the form parameter of the distribution. The default is 2. In case of the Monty Python method and the Ziggurat method, p can be chosen from |
mean |
A real number expressing the expectation of the distribution. The default is 0. |
sigma |
A positive number expressing the standard deviation of the distribution. The default is |
method |
A string expressing the method to be used for the simulation ("pgenpolar", "pgenpolarrej", "montypython", "ziggurat" or "nardonpianca"). The default is "nardonpianca". |
An -dimensional, real vector.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-rpgnorm(10000,3,method="pgenpolar")
y<-rpgnorm(10000,3,method="pgenpolar")
-generalized normal distributionThe function simulates the univariate, central, -generalized normal distribution by using the Monty Python method.
rpgnorm_montypython(n,p)
rpgnorm_montypython(n,p)
n |
The natural number of random variables to be simulated. |
p |
A positive number expressing the form parameter of the distribution. The default is 2. In case of the Monty Python method, p can be chosen from |
An -dimensional, real vector.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-rpgnorm_montypython(10000,3)
y<-rpgnorm_montypython(10000,3)
-generalized normal distributionThe function simulates the univariate, central, -generalized normal distribution by using the method of Nardon and Pianca.
rpgnorm_nardonpianca(n,p)
rpgnorm_nardonpianca(n,p)
n |
The natural number of random variables to be simulated. |
p |
A positive number expressing the form parameter of the distribution. The default is 2. |
An -dimensional, real vector.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-rpgnorm_nardonpianca(10000,3)
y<-rpgnorm_nardonpianca(10000,3)
-generalized normal distributionThe function simulates the univariate, central, -generalized normal distribution by using the
-generalized polar method.
rpgnorm_pgenpolar(n,p)
rpgnorm_pgenpolar(n,p)
n |
The natural number of random variables to be simulated. |
p |
A positive number expressing the form parameter of the distribution. The default is 2. |
An -dimensional, real vector.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-rpgnorm_pgenpolar(10000,3)
y<-rpgnorm_pgenpolar(10000,3)
-generalized normal distributionThe function simulates the univariate, central, -generalized normal distribution by using the
-generalized rejecting polar method.
rpgnorm_pgenpolarrej(n,p)
rpgnorm_pgenpolarrej(n,p)
n |
The natural number of random variables to be simulated. |
p |
A positive number expressing the form parameter of the distribution. The default is 2. |
An -dimensional, real vector.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-rpgnorm_pgenpolarrej(10000,3)
y<-rpgnorm_pgenpolarrej(10000,3)
-generalized normal distributionThe function simulates the univariate, central, -generalized normal distribution by using the Ziggurat method.
rpgnorm_ziggurat(n,p,x)
rpgnorm_ziggurat(n,p,x)
n |
The natural number of random variables to be simulated. |
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 |
x |
(optional) A real vector containing the |
An -dimensional, real vector.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-rpgnorm_ziggurat(10000,3)
y<-rpgnorm_ziggurat(10000,3)
-generalized uniform distributionThe function simulates the bivariate, -generalized uniform distribution on the
-generalized unit circle.
rpgunif(n,p)
rpgunif(n,p)
n |
The natural number of random vectors to be simulated. |
p |
A positive number expressing the form parameter of the distribution. The default is 2. |
A real matrix.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-rpgunif(10000,3)
y<-rpgunif(10000,3)
The function approximates the rightmost x-coordinates of the first n-1 rectangles defining the Ziggurat in case of the central, -generalized normal distribution.
zigsetup(p, n, tol)
zigsetup(p, n, tol)
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 |
n |
The number of rectangles that build up the Ziggurat. The default is |
tol |
A positive number expressing the approximation accuracy of the function. The default is |
An -dimensional, real vector.
Steve Kalke
S. Kalke and W.-D. Richter (2013)."Simulation of the p-generalized Gaussian distribution." Journal of Statistical Computation and Simulation. Volume 83. Issue 4.
y<-zigsetup(3,20,10^(-6))
y<-zigsetup(3,20,10^(-6))