Skip to contents

Computes CV(rho) = SD(rho) / E(rho) under alpha ~ Gamma(a, b).

Usage

cv_rho(a, b, M = .QUAD_NODES_DEFAULT)

Arguments

a

Numeric; shape parameter of the Gamma prior on alpha (a > 0).

b

Numeric; rate parameter of the Gamma prior on alpha (b > 0).

M

Integer; number of quadrature nodes. Default is 80.

Value

Numeric; coefficient of variation.

See also

Examples

cv_rho(a = 2, b = 1)
#> [1] 0.5937869
cv_rho(a = 1.6, b = 1.22)
#> [1] 0.5240019