Learn R Programming

gmatrix (version 0.3)

gdbeta: The Beta Distribution

Description

Density and random generation for the Beta distribution with parameters shape1 and shape2.

Usage

gdbeta(x, shape1, shape2, ncp = 0, log = FALSE, type = "d") grbeta(n, shape1, shape2, ncp = 0, type = "d")

Arguments

x
vector of quantiles
n
number of random values to return
shape1, shape2
positive parameters of the Beta distribution
ncp
must be 0 at this point
log
logical; if TRUE, probabilities p are given as log(p)
type
specify the type; may be "double", "single" (or short form "d" or "s")

Value

gdbeta gives the density and grbeta generates random deviates.

Details

Very similar to the R stats functionality.

See Also

dbeta

Examples

Run this code
myRndNums = grbeta(10,c(1,2), c(1,2,3,4,5))

Run the code above in your browser using DataLab