Uses numerical techniques for calculating the normalizing constant for the hyperdirichlet distribution
1 2 3 4 5 6 7 8
Object of class “hyperdirichlet” (or coerced thereto)
Vector of length
Boolean; see details section
Function specifying a subset of the simplex
over which to integrate; default
Boolean, with default
Further arguments passed to
B() is the user-friendly version. It accesses
NC slot. If not
NA, the value is returned; if
NA, the normalizing constant is calculated using
adaptIntegrate() of the
cubature() package, via
NC() is not intended for the user. It is used
internally as an accessor method for the
NC slot, and this
value is returned indiscriminately.
calculate_B() is the engine which actually
does the work. Observe how p is converted to
e_to_p()) and the integral proceeds over a hypercube.
gd() do not use this as the
normalizing constant has an analytical expression and this is used
probability() gives the probability of an
observation from a hyperdirichlet distribution satisfying
mgf() is the moment generating function,
taking an argument that specifies the powers of
p needed: the
expectation of prod
p^powers is returned.
mean() returns the mean value of the
hyperdirichlet distribution. This is computationally slow (consider
maximum_likelihood() 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
meaning to normalize so the sum is exactly 1
is.proper() checks a hyperdirichlet
distribution for being normalizable: a “proper”
hyperdirichlet object has a finite integral and therefore can be
normalized. This function is quite time-consuming for
hyperdirichlet distributions of large dimension.
irregardless argument to function
TRUE meaning to carry out the checks whatever
the value of slot
@validated [that is,
FALSE means that function
TRUE and to carry out the
check otherwise. Use this argument to force
carry out a check even if not strictly necessary.
validated() is an accessor method for the
@validated slot of hyperdirichlet object. It returns a
Boolean variable with
TRUE meaning that the object is
known to be “proper” (ie
TRUE), so it is normalizable, even if the normalization
constant is not known. This flag is present because many
hyperdirichlet objects of interest are known a priori to be
proper, so executing
is.proper() would be unnecessary.
return a scalar: the normalization constant
mgf() return a k-tuple
validated() return a Boolean
probability() returns a scalar, a probability.
The adapt package is no longer available on CRAN; from 1.4-3, the
adaptIntegrate of the cubature package.
Robin K. S. Hankin
1 2 3 4 5 6 7 8 9 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.