Learn R Programming

aster2 (version 0.3-2)

cumulant: Cumulant Functions for Aster Models

Description

Calculate cumulant function and up to three derivatives for families known to the package.

Usage

cumulant(theta, fam, deriv = 0, delta)

Value

a list containing some of the following components:

zeroth

the value of the cumulant function at \(\theta\).

first

the value of the first derivative at \(\theta\), a vector having the same dimension as \(\theta\).

second

the value of the second derivative at \(\theta\), a \(d \times d\) matrix if \(d\) is the dimension of \(\theta\) or a scalar if \(\theta\) is scalar.

third

the value of the third derivative at \(\theta\), a \(d \times d \times d\) array if \(d\) is the dimension of \(\theta\) or a scalar if \(\theta\) is scalar.

Arguments

theta

canonical parameter value.

fam

an object of class "astfam" produced by one of the family functions (see families) specifying the exponential family.

deriv

the number of derivatives wanted. Must be nonnegative integer less than or equal to three.

delta

direction in which limit is taken. Cumulant function is for family that is limit of family specified, limit being for distributions with parameter \(\theta + s \delta\), the limit being as \(s \to \infty\). May be missing, in which case \(\delta = 0\) is assumed, which is the same as no limit being taken.

See Also

families

Examples

Run this code
cumulant(-0.5, fam.bernoulli(), deriv = 3)
cumulant(-0.5, fam.bernoulli(), deriv = 3, delta = 1)

Run the code above in your browser using DataLab