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