ecgf {esaddle}R Documentation

Cumulant generating function estimation

Description

Calculates the empirical cumulant generating function (CGF) and its derivatives given a sample of n d-dimentional vectors.

Usage

ecgf(lambda, X, mix, grad = 0)

Arguments

lambda

point at which the empirical CGF is evaluated (d-dimensional vector).

X

an n by d matrix containing the data.

mix

fraction of empirical and normal CGF to use. If mix==1 only the empirical CGF is used, if mix==0 only the normal CGF is used.

grad

if grad==0 only the value of the CGF at lambda is returned, if grad==1 also its first derivative wrt lambda and if grad==2 also the second derivarive wrt lambda.

Details

For details on the CGF estimator being used here, see Fasiolo et al. (2016).

Value

A list with entries:

Author(s)

Matteo Fasiolo <matteo.fasiolo@gmail.com> and Simon N. Wood.

References

Fasiolo, M., Wood, S. N., Hartig, F. and Bravington, M. V. (2016). An Extended Empirical Saddlepoint Approximation for Intractable Likelihoods. ArXiv http://arxiv.org/abs/1601.01849.

Examples

X <- matrix(rnorm(2 * 1e3), 1e3, 2)
K <- ecgf(lambda = c(0, 0), X = X, mix = 0.5, grad = 2) 
K$K # CGF
K$dK # CGF' (gradient)
K$d2K # CGF'' (Hessian)

[Package esaddle version 0.0.7 Index]