B {hyper2}R Documentation

Normalizing constant for the hyperdirichlet distribution

Description

Numerical techniques for calculating the normalizing constant for the hyperdirichlet distribution

Usage

B(H, disallowed=NULL, give=FALSE, ...)
probability(H, disallowed=NULL, ...)
mgf(H, powers, ...) 
dhyper2(ip,H,...)
dhyper2_e(e,H,include.Jacobian=TRUE)
mean_hyper2(H, normalize=TRUE, ...)
Jacobian(e)
e_to_p(e)
p_to_e(p)

Arguments

H

Object of class hyper2

powers

Vector of length dim(x) whose elements are the powers of the expectation; 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

e, p

A vector; see details

ip

A vector of probabilities corresponding to indep(p) where p is vector with unit sum

include.Jacobian

Boolean, with default TRUE meaning to include the Jacobian transformation in the evaluation, and FALSE meaning to ignore it; use FALSE for likelihood work and TRUE for probability densities

give

Boolean, with default FALSE meaning to return the value of the integral and TRUE meaning to return the full output of adaptIntegrate()

normalize

Boolean, indicates whether return value of mean_hyper2() is normalized to have unit sum

...

Further arguments passed to adaptIntegrate()

Details

Value

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

loglik

Examples


# Two different measures of central tendency:
# mean_hyper2(chess,tol=0.1)   # takes ~10s to run
maxp(chess)                    # faster

# Using the 'disallowed' argument typically results in slow run times;
# use high tol for speed:

# probability(chess,disallowed=function(p){p[1]>p[2]},tol=0.5)
# probability(chess,disallowed=function(p){p[1]<p[2]},tol=0.5)

# Above should sum to 1 [they are exclusive and exhaustive events]



[Package hyper2 version 3.1-0 Index]