Learn R Programming

PoolBal (version 0.1-0)

betaDiv: Compute the Kullback-Leibler divergence between the beta and uniform distributions

Description

Computes the Kullback-Leibler divergence for the special case of the uniform density against the beta density.

Usage

betaDiv(a, w = (1 - a)/(b - a), b = 1/w + a * (1 - 1/w))

Value

A real value.

Arguments

a

first shape parameter between 0 and infinity

w

UMP parameter between 0 and 1

b

second shape parameter between 0 and infinity

Author

Chris Salahub

Details

This function accepts either the a/b parameterization (equivalent to shape1/shape2 in R), or the a/w parameterization which links the divergence to the UMP test.

Examples

Run this code
betaDiv(a = 0.5, w = 0.5)
betaDiv(a = 0.1, b = 1)

Run the code above in your browser using DataLab