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.
Value
A list with entries:
K the value of the empirical CGF at lambda;
dK the value of the gradient empirical CGF wrt lambda at lambda;
d2K the value of the hessian of the empirical CGF wrt lambda at lambda.
Details
For details on the CGF estimator being used here, see Fasiolo et al. (2016).
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.