B {hyperdirichlet}R Documentation

Normalizing constant for the hyperdirichlet distribution

Description

Uses numerical techniques for calculating the normalizing constant for the hyperdirichlet distribution

Usage

B(x, ...)
NC(x)
calculate_B(x, disallowed=NULL, give=FALSE, ...)
probability(x, disallowed, ...)
mgf(x, powers, ...)
mean(x, ...)
is.proper(x,irregardless)
validated(x)

Arguments

x Object of class “hyperdirichlet” (or coerced thereto)
powers Vector of length dim(x) whose elements are the powers of the expectation; see details section
irregardless Boolean; see details section
disallowed Function specifying a subset of the simplex over which to integrate; default NULL means to integrate over the whole simplex. The integration proceeds over p with disallowed(p) evaluating to FALSE
give Boolean, with default FALSE meaning to return the value of the integral and TRUE meaning to return the full output of adapt()
... Further arguments passed to adapt()

Details

Value

Functions B(), NC(), calculate_NC() notionally return a scalar: the normalization constant
Functions mean() and mgf() return a k-tuple
Functions is.proper() and validated() return a Boolean
Function probability() returns a scalar, a probability.

Note

The adapt package is no longer available on CRAN: so the adapt() function is not available either.

You may be able to install the adapt package notwithstanding its availability on CRAN or is license. If you are happy with this (I am), install the adapt package and everything should work.

I am working on providing a replacement for adapt(), but this is low on my list of priorities. Sorry about this.

Author(s)

Robin K. S. Hankin

See Also

hyperdirichlet

Examples


a <- hyperdirichlet(c(4,3,6,5,4,3,2,1))
## Not run: 
B(a)                                    # Not recommended
a <- as.hyperdirichlet(a,TRUE)          # Recommended

is.proper(a)

mgf(a,powers=1:3)    # expectation of p1^1 * p2^2 * p3^3
## End(Not run)


[Package hyperdirichlet version 1.3-8 Index]