urpareto {Runuran} | R Documentation |
UNU.RAN Pareto random variate generator
Description
UNU.RAN random variate generator for the Pareto distribution (of first
kind) with shape parameters k
and a
.
It also allows sampling from the truncated distribution.
[Special Generator] – Sampling Function: Pareto (of first kind).
Usage
urpareto(n, k, a, lb=k, ub=Inf)
Arguments
n |
size of required sample. |
k |
(strictly positive) shape and location parameter. |
a |
(strictly positive) shape parameter. |
lb |
lower bound of (truncated) distribution. |
ub |
upper bound of (truncated) distribution. |
Details
The Pareto distribution with parameters k
and a
has density
f(x) = a k^a x^{-(a+1)}
for x \ge k
, k> 0
and a>0
.
The generation algorithm uses fast numerical inversion. The parameters
lb
and ub
can be used to generate variates from
the Pareto distribution truncated to the interval (lb
,ub
).
Note
This function is wrapper for the UNU.RAN class in R.
Author(s)
Josef Leydold and Wolfgang H\"ormann unuran@statmath.wu.ac.at.
References
W. H\"ormann, J. Leydold, and G. Derflinger (2004): Automatic Nonuniform Random Variate Generation. Springer-Verlag, Berlin Heidelberg
N.L. Johnson, S. Kotz, and N. Balakrishnan (1994): Continuous Univariate Distributions, Volume 1. 2nd edition, John Wiley & Sons, Inc., New York. Chap.20, p.574.
See Also
runif
and .Random.seed
about random number
generation and unuran
for the UNU.RAN class.
Examples
## Create a sample of size 1000
x <- urpareto(n=1000,k=2,a=3)