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 Rfunctions these ur...
functions have a different behavior:
ur...
functions are often much faster for large
samples (e.g., a factor of about 5 for the$t$distribution).
For small samples they are slow.ur...
functions allow to sample from truncated
versions of the original distributions. Therefore the argumentslb
(lower border) andub
(upper border) are
available for all these functions.ur...
functions are based on fast numerical
inversion algorithms. This is important for example for generating
order statistics, quasi-Monte Carlo methods or random vectors from
copulas.ur...
functions donotallow vectors as
arguments (to be more precise: they only use the first element of
the vector).However, we recommend to use the more flexible approach described in the next sections below.
A list of all available special generators can be found in
Runuran.special.generators
.
unuran
. These can then
be used to draw samples from the desired distribution by means of
function ur
.
Methods that implement an inversion method can also be
used for quantile function uq
.
Currently the following methods are available by such functions.
Continuous Univariate Distributions:
ars.new
... Adaptive Rejection Sampling
itdr.new
... Inverse Transformed Density Rejection
pinv.new
... Polynomial interpolation of INVerse CDF
srou.new
... Simple Ratio-Of-Uniforms method
tdr.new
... Transformed Density Rejection
}
Discrete Distributions:
dari.new
... Discrete Automatic Rejection Inversion
dau.new
... Alias-Urn Method
dgt.new
... Guide-Table Method for discrete inversion
}
Multivariate Distributions:
hitro.new
... Hit-and-Run with Ratio-of-Uniforms method
vnrou.new
... Multivariate Naive Ratio-Of-Uniforms method
} A list of all available distributions can be found in
Runuran.distributions
.
An introduction to vignette("Runuran")
).