2014-02-16 21:48:40 +00:00
|
|
|
# Saddlepoint approximation of the density function of the
|
|
|
|
# GAL distribution
|
|
|
|
#
|
|
|
|
# Author: Francois Pelletier
|
|
|
|
#
|
|
|
|
# LGPL 3.0
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
#' Saddlepoint approximation of the density function of the
|
|
|
|
#' GAL distribution
|
|
|
|
#' @param x vector of quantiles
|
|
|
|
#' @param param Parameter vector
|
|
|
|
#' @param eval.time Time of the process
|
|
|
|
#' @param type Choose between "mu" or "kappa" parametrization
|
|
|
|
#' @param log Logical for log-parameters
|
2014-03-06 02:44:52 +00:00
|
|
|
#' @export dsaddleapproxGAL
|
2014-02-16 21:48:40 +00:00
|
|
|
#' @return Saddlepoint approximation of the density function
|
2014-03-06 02:44:52 +00:00
|
|
|
#' @author Francois Pelletier
|
2014-02-16 21:48:40 +00:00
|
|
|
dsaddleapproxGAL <- function(x,param,eval.time=1,type="mu",log=FALSE)
|
|
|
|
{
|
|
|
|
s <- saddlepointGAL(x,param,eval.time,type,log)
|
|
|
|
1/sqrt(2*pi*diffcgfGAL(s,2,param,eval.time,type,log)) * exp(cgfGAL(s,param,type,log)-s*x)
|
|
|
|
}
|