Description Usage Arguments Details Value Note Author(s) See Also Examples
Numerical techniques for calculating the normalizing constant for the hyperdirichlet distribution
1 2 3 4 5 6 7 8 9 
H 
Object of class hyper2 
powers 
Vector of length 
disallowed 
Function specifying a subset of the simplex
over which to integrate; default 
e,p 
A vector; see details 
ip 
A vector of probabilities corresponding to 
include.Jacobian 
Boolean, with default 
give 
Boolean, with default 
normalize 
Boolean, indicates whether return value of

... 
Further arguments passed to 
Function B()
returns the normalizing constant of a
hyperdirichlet likelihood function. Internally, p is
converted to e
(by e_to_p()
) and the integral proceeds
over a hypercube. This function can be very slow, especially if
disallowed
is used.
Function dhyper2(ip,H)
is a probability density
function on the independent components of a unitsum vector, that
is, ip=indep(p)
. This function calls B()
each time so
might be a performance bottleneck.
Function probability()
gives the probability of an
observation from a hyperdirichlet distribution satisfying
!disallowed(p)
.
Function mgf()
is the moment generating function,
taking an argument that specifies the powers of p
needed: the
expectation of prod
p^powers is returned.
Function mean_hyper2()
returns the mean value of the
hyperdirichlet distribution. This is computationally slow (consider
maxp()
for a measure of central tendency). The function
takes a normalize
argument, not passed to
adaptIntegrate()
: this is Boolean with FALSE
meaning
to return the value found by integration directly, and default
TRUE
meaning to normalize so the sum is exactly 1
Function B()
returns a scalar: the normalization
constant
Function dhyper2()
is a probability density function
over indep(p)
Function mean()
returns a ktuple with unit sum
Function mgf()
returns a scalar equal to the expectation of
p^power
Functions is.proper()
and validated()
return a Boolean
Function probability()
returns a scalar, a (Bayesian)
probability
The adapt package is no longer available on CRAN; from 1.43, the
package uses adaptIntegrate
of the cubature package.
Robin K. S. Hankin
1 2 3 4 5 6 7  data(chess)
mean_hyper2(chess)
maxp(chess)
# disallowed argument typically means slow run times; use high tol for speed
probability(chess,disallowed=function(p){p[1]>p[2]},tol=0.1)
probability(chess,disallowed=function(p){p[1]<p[2]},tol=0.1)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.