B: Normalizing constant for the hyperdirichlet distribution

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

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

Usage

1
2
3
4
5
6
7
8
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 adaptIntegrate()

...

Further arguments passed to adaptIntegrate()

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; from 1.4-3, the package uses adaptIntegrate of the cubature package.

Author(s)

Robin K. S. Hankin

See Also

hyperdirichlet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

hyperdirichlet documentation built on May 31, 2017, 5:18 a.m.

Search within the hyperdirichlet package
Search all R packages, documentation and source code