dinfo: Information for Beta and Gamma Distributions

dinfoR Documentation

Information for Beta and Gamma Distributions

Description

Show means, variances and modes for beta and gamma distributions.

Usage

ibeta(mean, var, shape1, shape2)
igamma(mean, var, shape, scale)

Arguments

mean, var

Numeric vectors giving means and variances.

shape1, shape2

Numeric vectors. See dbeta.

shape, scale

Numeric vectors. See dgamma.

Details

For ibeta, either both of mean and var or both of shape1 and shape2 must be specified. For igamma, either both of mean and var or both of shape and scale must be specified. The pair of vectors that are passed to each function define a set of beta/gamma distributions. If one vector is shorter than the other, the shorter vector is replicated.

Value

A matrix with five columns and n rows, where n is the length of the longest argument. If n = 1 the dimension is dropped (i.e. a vector of length five is returned). The columns contain the means, variances, modes, and the shape/scale parameters of the specified distributions. If a mode is NA, it does not exist, or it is not unique, or it does not occur in the interior of the support. If an entire row is NA, the corresponding arguments do not lead to a valid distribution.

See Also

dbeta, dgamma

Examples

ibeta(shape1 = 5, shape2 = 4)
ibeta(mean = seq(0.1,0.9,0.2), var = 0.03)
igamma(shape=c(38.9,7.1,47), scale=c(1.5,6.3,2.6))

evdbayes documentation built on March 7, 2023, 5:34 p.m.

Related to dinfo in evdbayes...