Runuran-package {Runuran}R Documentation

Runuran – R interface to Universal Non-Uniform RANdom variate generators library

Description

R interface to the UNU.RAN library for Universal Non-Uniform RANdom variate generators

Details

Package: Runuran
Type: Package
Version: 0.4
Date: 2007-05-16
License: GPL 2 or later

This package provides an interface to the UNU.RAN library for universal non-uniform random number generators.

It provides the following two main calls:

unuran.new(dist.string,method.string)
Create a UNU.RAN object. For details see unuran.new.
unuran.sample(unuran.object,sample.size)
Get a random sample from the UNU.RAN object. For details see unuran.sample.

It uses the R built-in uniform random number generator.

The Runuran package makes use of the string API of UNU.RAN, i.e., distributions and methods are described as strings and passed directly to UNU.RAN. See unuran.new for a short introduction to this interface.

The Runuran uses S4 classes to implemented this interface to UNU.RAN.

The functions urdgt and urdau are provided to allow an easy to use interface when generating from discrete distributions with given probability vectors.

To facilitate the use of the package for standard distributions the package also includes direct generation functions for approximately 30 standard distributions.

For continuous univariate distributions these calls are: urbeta, urburr, urcauchy, urchi, urchisq, urexp, urextremeI, urextremeII, urf, urgamma, urgig, urhyperbolic, urlaplace, urlnorm, urlogis, urlomax, urnorm, urpareto, urplanck, urpowerexp, urrayleigh, urt, urtriang, and urweibull.

For discrete distributions these are: urbinom, urgeom, urhyper, urlogarithmic, urnbinom, and urpois.

All these calls have similar syntax to the analogous R built-in generating functions (if these exist) but have an optional domain arguments lb and ub, i.e., these calls also allow to draw samples from truncated distributions:

ur...(n, distribution parameters, lb , ub)

Compared to the corresponding R functions these ur functions have a slightly different behavior.

Note

The interface has been changed compared to the DSC 2003 paper.

Author(s)

Josef Leydold and Wolfgang H"ormann unuran@statmath.wu-wien.ac.at.

References

J. Leydold and W. H"ormann (2000-2007): UNU.RAN User Manual, see http://statmath.wu-wien.ac.at/unuran/.

W.~H"ormann, J.~Leydold, and G.~Derflinger (2004): Automatic Nonuniform Random Variate Generation. Springer-Verlag, Berlin Heidelberg

G.~Tirler and J.~Leydold (2003): Automatic Nonuniform Random Variate Generation in R. In: K.~Hornik and F.~Leisch, Proceedings of the 3rd International Workshop on Distributed Statistical Computing (DSC~2003), March 20–22, Vienna, Austria.

See Also

unuran.new, unuran-class, urdgt and urdau.


[Package Runuran version 0.4 Index]