udbeta: UNU.RAN object for Beta distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/distributions.R

Description

Create UNU.RAN object for a Beta distribution with with parameters shape1 and shape2.

[Distribution] – Beta.

Usage

1
udbeta(shape1, shape2, lb=0, ub=1)

Arguments

shape1,shape2

positive shape parameters of the Beta distribution.

lb

lower bound of (truncated) distribution.

ub

upper bound of (truncated) distribution.

Details

The Beta distribution with parameters shape1 = a and shape2 = b has density

f(x) = Gamma(a+b)/(Gamma(a)Gamma(b))x^(a-1)(1-x)^(b-1)

for a > 0, b > 0 and 0 <= x <= 1.

The domain of the distribution can be truncated to the interval (lb,ub).

Value

An object of class "unuran.cont".

Author(s)

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

References

N.L. Johnson, S. Kotz, and N. Balakrishnan (1995): Continuous Univariate Distributions, Volume 2. 2nd edition, John Wiley & Sons, Inc., New York. Chap. 25, p. 210.

See Also

unuran.cont.

Examples

1
2
3
4
5
6
## Create distribution object for beta distribution
distr <- udbeta(shape1=3,shape2=7)
## Generate generator object; use method PINV (inversion)
gen <- pinvd.new(distr)
## Draw a sample of size 100
x <- ur(gen,100)


Runuran documentation built on May 19, 2017, 9:59 p.m.
Search within the Runuran package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.