From 1debac4cff3256132195dcb863a6cfc759f5fb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pelletier?= Date: Sun, 16 Feb 2014 16:48:40 -0500 Subject: [PATCH] Ajout de plusieurs fonctions concernant l'approximation de la distribution GAL --- R/cfLM.R | 2 +- R/cgfEsscherGAL.R | 33 +++++++++++++++ R/{fgmGAL.R => cgfGAL.R} | 37 +---------------- R/diffcgfEsscherGAL.R | 60 +++++++++++++++++++++++++++ R/diffcgfGAL.R | 76 ++++++++++++++++++++++++++++++++++ R/dnormapproxEsscherLM.R | 28 +++++++++++++ R/dsaddleapproxGAL.R | 22 ++++++++++ R/mgfGAL.R | 41 ++++++++++++++++++ R/pnormapproxEsscherLM.R | 27 ++++++++++++ R/psaddleapproxEsscherGAL.R | 33 +++++++++++++++ R/psaddleapproxGAL.R | 33 +++++++++++++++ R/saddlepointEsscherGAL.R | 36 ++++++++++++++++ R/saddlepointGAL.R | 32 ++++++++++++++ man/cfLM.Rd | 2 +- man/cgfEsscherGAL.Rd | 31 ++++++++++++++ man/diffcgfEsscherGAL.Rd | 34 +++++++++++++++ man/diffcgfGAL.Rd | 33 +++++++++++++++ man/dnormapproxEsscherLM.Rd | 33 +++++++++++++++ man/dsaddleapproxGAL.Rd | 27 ++++++++++++ man/pnormapproxEsscherLM.Rd | 32 ++++++++++++++ man/psaddleapproxEsscherGAL.Rd | 27 ++++++++++++ man/psaddleapproxGAL.Rd | 27 ++++++++++++ man/saddlepointEsscherGAL.Rd | 32 ++++++++++++++ man/saddlepointGAL.Rd | 30 ++++++++++++++ 24 files changed, 730 insertions(+), 38 deletions(-) create mode 100644 R/cgfEsscherGAL.R rename R/{fgmGAL.R => cgfGAL.R} (53%) create mode 100644 R/diffcgfEsscherGAL.R create mode 100644 R/diffcgfGAL.R create mode 100644 R/dnormapproxEsscherLM.R create mode 100644 R/dsaddleapproxGAL.R create mode 100644 R/mgfGAL.R create mode 100644 R/pnormapproxEsscherLM.R create mode 100644 R/psaddleapproxEsscherGAL.R create mode 100644 R/psaddleapproxGAL.R create mode 100644 R/saddlepointEsscherGAL.R create mode 100644 R/saddlepointGAL.R create mode 100644 man/cgfEsscherGAL.Rd create mode 100644 man/diffcgfEsscherGAL.Rd create mode 100644 man/diffcgfGAL.Rd create mode 100644 man/dnormapproxEsscherLM.Rd create mode 100644 man/dsaddleapproxGAL.Rd create mode 100644 man/pnormapproxEsscherLM.Rd create mode 100644 man/psaddleapproxEsscherGAL.Rd create mode 100644 man/psaddleapproxGAL.Rd create mode 100644 man/saddlepointEsscherGAL.Rd create mode 100644 man/saddlepointGAL.Rd diff --git a/R/cfLM.R b/R/cfLM.R index fd2b89a..f0a2455 100644 --- a/R/cfLM.R +++ b/R/cfLM.R @@ -15,7 +15,7 @@ #' @return Characteristic function value at point u for given parameter vector #' #' @author Francois Pelletier -cfLM <- function(u,param,time,type="mu",log=FALSE,start=0) +cfLM <- function(u,param,time=1,type="mu",log=FALSE,start=0) { testparGAL(param,type,log) if(log) diff --git a/R/cgfEsscherGAL.R b/R/cgfEsscherGAL.R new file mode 100644 index 0000000..d4ee35a --- /dev/null +++ b/R/cgfEsscherGAL.R @@ -0,0 +1,33 @@ +# Cumulant generating function of the +# Esscher transform with parameter 1 of GAL distribution +# +# Author: Francois Pelletier +# +# LGPL 3.0 +############################################################################### + + +#' Cumulant generating function of the +#' Esscher transform with parameter 1 of GAL distribution +#' @param u Transform variate +#' @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 +#' @return Cumulant generating function value at point u for given parameter vector +#' +#' @author Francois Pelletier +cgfEsscherGAL <- function(u,param,eval.time=1,type="mu",log=FALSE) +{ + if(type=="mu") + { + log((exp(param[1]*(u+1))/(1-(1/2)*param[2]^2*(u+1)^2-param[3]*(u+1))^param[4])^eval.time/ + (exp(param[1])/(1-(1/2)*param[2]^2-param[3])^param[4])^eval.time) + } + if(type=="kappa") + { + + } +} + + diff --git a/R/fgmGAL.R b/R/cgfGAL.R similarity index 53% rename from R/fgmGAL.R rename to R/cgfGAL.R index 93ea5d9..8f5cb0e 100644 --- a/R/fgmGAL.R +++ b/R/cgfGAL.R @@ -1,4 +1,3 @@ -# Moment generating function of GAL distribution # Cumulant generating function of GAL distribution # # Author: Francois Pelletier @@ -6,40 +5,6 @@ # LGPL 3.0 ############################################################################### -#' Moment generating function of GAL distribution -#' @param u Transform variate -#' @param param Parameter vector -#' @param type Choose between "mu" or "kappa" parametrization -#' @param log Logical for log-parameters -#' @return Moment generating function value at point u for given parameter vector -#' -#' @author Francois Pelletier -mgfGAL <- function(u,param,type="mu",log=FALSE) -{ - testparGAL(param,type,log) - if(log) - { - if(type=="mu") - { - exp(exp(param[1])*u)*(1-(1/2)*exp(param[2])^2*u^2-exp(param[3])*u)^(-exp(param[4])) - } - if(type=="kappa") - { - exp(exp(param[1])*u)*((exp(param[2])^2*u^2)/2+(exp(param[3])*exp(param[2])*u)/sqrt(2)-(exp(param[2])*u)/(sqrt(2)*exp(param[3]))+1)^(-exp(param[4])) - } - } - else - { - if(type=="mu") - { - exp(param[1]*u)*(1-(1/2)*param[2]^2*u^2-param[3]*u)^(-param[4]) - } - if(type=="kappa") - { - exp(param[1]*u)*((param[2]^2*u^2)/2+(param[3]*param[2]*u)/sqrt(2)-(param[2]*u)/(sqrt(2)*param[3])+1)^(-param[4]) - } - } -} #' Cumulant generating function of GAL distribution #' @param u Transform variate @@ -74,4 +39,4 @@ cgfGAL <- function(u,param,type="mu",log=FALSE) log(exp(param[1]*u)*((param[2]^2*u^2)/2+(param[3]*param[2]*u)/sqrt(2)-(param[2]*u)/(sqrt(2)*param[3])+1)^(-param[4])) } } -} \ No newline at end of file +} diff --git a/R/diffcgfEsscherGAL.R b/R/diffcgfEsscherGAL.R new file mode 100644 index 0000000..9fe2934 --- /dev/null +++ b/R/diffcgfEsscherGAL.R @@ -0,0 +1,60 @@ +# Differenciation of the cumulant generating fonction of the +# Esscher transform with parameter 1 of the GAL distribution +# +# Author: Francois Pelletier +# +# LGPL 3.0 +############################################################################### + + +#' Differenciation of the cumulant generating fonction of the +#' Esscher transform with parameter 1 of the GAL distribution +#' @param u Transform variate point of evaluation +#' @param order Order of differenciation +#' @param param Parameters of the GAL distirbution +#' @param eval.time Time of the process +#' @param type Choose between "mu" or "kappa" parametrization +#' @param log Logical for log-parameters +#' @return The value of the derivative at the transform variate point of evaluation +#' +#' @author Francois Pelletier +diffcgfEsscherGAL <- function(u,order,param,eval.time=1,type="mu",log=FALSE) +{ + if(type=="mu") + { + if(order==1) + { + } + if(order==2) + { + 2*eval.time*param[4]*(2*param[3]^2+param[2]^4+2*param[2]^2+param[2]^4*u^2+2*param[2]^2*u*param[3]+2*param[3]*param[2]^2+2*param[2]^4*u)/(-2+param[2]^2*u^2+2*param[2]^2*u+param[2]^2+2*param[3]*u+2*param[3])^2 + } + if(order==3) + { + -4*eval.time*param[4]*(6*param[2]^4+param[2]^6+3*param[2]^4*u^2*param[3]+6*param[2]^4*u*param[3]+6*param[2]^2*u*param[3]^2+4*param[3]^3+6*param[3]*param[2]^2+6*param[2]^4*u+param[2]^6*u^3+3*param[2]^6*u^2+3*param[2]^6*u+3*param[2]^4*param[3]+6*param[2]^2*param[3]^2)/(-2+param[2]^2*u^2+2*param[2]^2*u+param[2]^2+2*param[3]*u+2*param[3])^3 + } + if(order==4) + { + + } + } + else if(type=="kappa") + { + if(order==1) + { + + } + if(order==2) + { + + } + if(order==3) + { + + } + if(order==4) + { + + } + } +} \ No newline at end of file diff --git a/R/diffcgfGAL.R b/R/diffcgfGAL.R new file mode 100644 index 0000000..76bb859 --- /dev/null +++ b/R/diffcgfGAL.R @@ -0,0 +1,76 @@ +# Differenciation of the cumulant generating fonction of the +# GAL distribution +# +# Author: Francois Pelletier +# +# LGPL 3.0 +############################################################################### + + +#' Differenciation of the cumulant generating fonction of the +#' GAL distribution +#' @param u Transform variate point of evaluation +#' @param order Order of differenciation +#' @param param Parameters of the GAL distirbution +#' @param eval.time Time of the process +#' @param type Choose between "mu" or "kappa" parametrization +#' @param log Logical for log-parameters +#' @return The value of the derivative at the transform variate point +#' of evaluation +#' +#' @author Francois Pelletier +diffcgfGAL <- function(u,order,param,eval.time=1,type="mu",log=FALSE) +{ + if(type=="mu") + { + if(order==1) + { + + } + if(order==2) + { + 2*eval.time*param[4]*(2*param[2]^2*u*param[3]+ + 2*param[3]^2+2*param[2]^2+param[2]^4*u^2)/ + (-2+param[2]^2*u^2+2*param[3]*u)^2 + } + if(order==3) + { + -4*eval.time*param[4]*(3*param[2]^4*u^2*param[3]+ + 6*param[2]^2*u*param[3]^2+param[2]^6*u^3+ + 6*param[2]^4*u+6*param[2]^2*param[3]+4*param[3]^3)/ + (-2+param[2]^2*u^2+2*param[3]*u)^3 + } + if(order==4) + { + (12*param[2]^8*param[4]*u^4+48*param[3]*param[2]^6*param[4]*u^3+ + (144*param[2]^6+144*param[3]^2*param[2]^4)*param[4]*u^2+ + (288*param[3]*param[2]^4+192*param[3]^3*param[2]^2)*param[4]*u+ + (48*param[2]^4+192*param[3]^2*param[2]^2+96*param[3]^4)*param[4])/ + (param[2]^8*u^8+8*param[3]*param[2]^6*u^7+ + (24*param[3]^2*param[2]^4-8*param[2]^6)*u^6+ + (32*param[3]^3*param[2]^2-48*param[3]*param[2]^4)*u^5+ + (24*param[2]^4-96*param[3]^2*param[2]^2+16*param[3]^4)*u^4+ + (96*param[3]*param[2]^2-64*param[3]^3)*u^3+ + (96*param[3]^2-32*param[2]^2)*u^2+(-64)*param[3]*u+16) + } + } + if(type=="kappa") + { + if(order==1) + { + + } + if(order==2) + { + + } + if(order==3) + { + + } + if(order==4) + { + + } + } +} diff --git a/R/dnormapproxEsscherLM.R b/R/dnormapproxEsscherLM.R new file mode 100644 index 0000000..feab30b --- /dev/null +++ b/R/dnormapproxEsscherLM.R @@ -0,0 +1,28 @@ +# Normal approximation of the density function of the Esscher +# transform of a Laplace Motion +# +# Author: Francois Pelletier +# +# LGPL 3.0 +############################################################################### + +#' Normal approximation of the density function of the +#' Esscher transform of a Laplace Motion +#' @param x vector of quantiles +#' @param param Parameter vector +#' @param hEsscher Esscher transform parameter +#' @param eval.time Time of the process +#' @param type Choose between "mu" or "kappa" parametrization +#' @param log Logical for log-parameters +#' @param start Starting value of the process + +#' @return Normal density function approximation of the Esscher transform +#' of the specified Laplace motion +dnormapproxEsscherLM <- function(x,param,hEsscher=0,eval.time=1,type="mu",log=FALSE,start=0) +{ + dnorm(x,start+eval.time*(mGAL(1,param,type,log)+hEsscher*cmGAL(2,param,type,log)), + sqrt(eval.time*cmGAL(2,param,type,log))) +} + + + diff --git a/R/dsaddleapproxGAL.R b/R/dsaddleapproxGAL.R new file mode 100644 index 0000000..fd9f330 --- /dev/null +++ b/R/dsaddleapproxGAL.R @@ -0,0 +1,22 @@ +# 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 + +#' @return Saddlepoint approximation of the density function +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) +} diff --git a/R/mgfGAL.R b/R/mgfGAL.R new file mode 100644 index 0000000..df1522a --- /dev/null +++ b/R/mgfGAL.R @@ -0,0 +1,41 @@ +# Moment generating function of GAL distribution +# +# Author: Francois Pelletier +# +# LGPL 3.0 +############################################################################### + +#' Moment generating function of GAL distribution +#' @param u Transform variate +#' @param param Parameter vector +#' @param type Choose between "mu" or "kappa" parametrization +#' @param log Logical for log-parameters +#' @return Moment generating function value at point u for given parameter vector +#' +#' @author Francois Pelletier +mgfGAL <- function(u,param,type="mu",log=FALSE) +{ + testparGAL(param,type,log) + if(log) + { + if(type=="mu") + { + exp(exp(param[1])*u)*(1-(1/2)*exp(param[2])^2*u^2-exp(param[3])*u)^(-exp(param[4])) + } + if(type=="kappa") + { + exp(exp(param[1])*u)*((exp(param[2])^2*u^2)/2+(exp(param[3])*exp(param[2])*u)/sqrt(2)-(exp(param[2])*u)/(sqrt(2)*exp(param[3]))+1)^(-exp(param[4])) + } + } + else + { + if(type=="mu") + { + exp(param[1]*u)*(1-(1/2)*param[2]^2*u^2-param[3]*u)^(-param[4]) + } + if(type=="kappa") + { + exp(param[1]*u)*((param[2]^2*u^2)/2+(param[3]*param[2]*u)/sqrt(2)-(param[2]*u)/(sqrt(2)*param[3])+1)^(-param[4]) + } + } +} \ No newline at end of file diff --git a/R/pnormapproxEsscherLM.R b/R/pnormapproxEsscherLM.R new file mode 100644 index 0000000..490ecf8 --- /dev/null +++ b/R/pnormapproxEsscherLM.R @@ -0,0 +1,27 @@ +# Normal approximation of the distribution function of the Esscher +# transform of a Laplace Motion +# +# Author: Francois Pelletier +# +# LGPL 3.0 +############################################################################### + +#' Normal approximation of the distribution function of the +#' Esscher transform of a Laplace Motion +#' @param x vector of quantiles +#' @param param Parameter vector +#' @param hEsscher Esscher transform parameter +#' @param eval.time Time of the process +#' @param type Choose between "mu" or "kappa" parametrization +#' @param log Logical for log-parameters +#' @param start Starting value of the process + +#' @return Normal distribution function approximation +pnormapproxEsscherLM <- function(x,param,hEsscher=0,eval.time=1,type="mu",log=FALSE,start=0) +{ + pnorm(x,start+eval.time*(mGAL(1,param,type,log)+hEsscher*cmGAL(2,param,type,log)), + sqrt(eval.time*cmGAL(2,param,type,log))) +} + + + diff --git a/R/psaddleapproxEsscherGAL.R b/R/psaddleapproxEsscherGAL.R new file mode 100644 index 0000000..94f6262 --- /dev/null +++ b/R/psaddleapproxEsscherGAL.R @@ -0,0 +1,33 @@ +# Saddlepoint approximation of the distribution function of the Esscher +# transform of the GAL distribution +# +# Author: Francois Pelletier +# +# LGPL 3.0 +############################################################################### + +#' Saddlepoint approximation of the distribution function of the Esscher +#' transform 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 + +#' @return Saddlepoint approximation of the distribution function +psaddleapproxEsscherGAL <- function(x,param,eval.time=1,type="mu",log=FALSE) +{ + s <- saddlepointEsscherGAL(x,param,eval.time,type,log) + u <- s * sqrt(diffcgfEsscherGAL(s,2,param,eval.time,type,log)) + w <- sign(s)*sqrt(2*(s*x-cgfEsscherGAL(s,param,type,log))) + + if(x==mGAL(1,param,type,log)) + { + 1/2 + diffcgfEsscherGAL(0,3,param,eval.time,type,log)/ + (6*sqrt(2*pi)*diffcgfEsscherGAL(0,2,param,eval.time,type,log)^(3/2)) + } + else + { + pnorm(w)+dnorm(w)*(1/w-1/u) + } +} \ No newline at end of file diff --git a/R/psaddleapproxGAL.R b/R/psaddleapproxGAL.R new file mode 100644 index 0000000..3d3e5b1 --- /dev/null +++ b/R/psaddleapproxGAL.R @@ -0,0 +1,33 @@ +# Saddlepoint approximation of the distribution function of the +# GAL distribution +# +# Author: Francois Pelletier +# +# LGPL 3.0 +############################################################################### + +#' Saddlepoint approximation of the distribution 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 + +#' @return Saddlepoint approximation of the distribution function +psaddleapproxGAL <- function(x,param,eval.time=1,type="mu",log=FALSE) +{ + s <- saddlepointGAL(x,param,eval.time,type,log) + u <- s * sqrt(diffcgfGAL(s,2,param,eval.time,type,log)) + w <- sign(s)*sqrt(2*(s*x-cgfGAL(s,param,type,log))) + + if(x==mGAL(1,param,type,log)) + { + 1/2 + diffcgfGAL(0,3,param,eval.time,type,log)/ + (6*sqrt(2*pi)*diffcgfGAL(0,2,param,eval.time,type,log)^(3/2)) + } + else + { + pnorm(w)+dnorm(w)*(1/w-1/u) + } +} diff --git a/R/saddlepointEsscherGAL.R b/R/saddlepointEsscherGAL.R new file mode 100644 index 0000000..e470f7a --- /dev/null +++ b/R/saddlepointEsscherGAL.R @@ -0,0 +1,36 @@ +# Evaluation of the saddlepoint of the Esscher transform with +# parameter 1 of the GAL distribution for given quantiles +# +# Author: Francois Pelletier +# +# LGPL 3.0 +############################################################################### + + +#' Evaluation of the saddlepoint of the Esscher transform with +#' parameter 1 of the GAL distribution for given quantiles +#' @param x vector of quantiles +#' @param param Parameters of the underlying GAL distribution +#' @param eval.time Time of the process +#' @param type Choose between "mu" or "kappa" parametrization +#' @param log Logical for log-parameters +#' @return The value of the saddlepoint for each point of the vector of quantiles +#' +#' @author Francois Pelletier +saddlepointEsscherGAL <- function(x,param,eval.time=1,type="mu",log=FALSE) +{ + if(type=="mu") + { + (-eval.time*param[1]*param[2]^2+eval.time*param[4]*param[2]^2+x*param[2]^2- + eval.time*param[1]*param[3]+x*param[3]- + sqrt(eval.time^2*param[1]^2*param[3]^2-2*eval.time*param[1]*param[3]^2*x+ + eval.time^2*param[4]^2*param[2]^4+x^2*param[3]^2+ + 2*eval.time^2*param[1]^2*param[2]^2- + 4*eval.time*param[1]*param[2]^2*x+2*x^2*param[2]^2))/ + (param[2]^2*(eval.time*param[1]-x)) + } + else if (type=="kappa") + { + + } +} diff --git a/R/saddlepointGAL.R b/R/saddlepointGAL.R new file mode 100644 index 0000000..afe1d3c --- /dev/null +++ b/R/saddlepointGAL.R @@ -0,0 +1,32 @@ +# Evaluation of the saddlepoint of the GAL distribution for given quantiles +# +# Author: Francois Pelletier +# +# LGPL 3.0 +############################################################################### + + +#' Evaluation of the saddlepoint of the GAL distribution for given quantiles +#' @param x vector of quantiles +#' @param param Parameters of the GAL distribution +#' @param eval.time Time of the process +#' @param type Choose between "mu" or "kappa" parametrization +#' @param log Logical for log-parameters +#' @return The value of the saddlepoint for each point of the vector of quantiles +#' +#' @author Francois Pelletier +saddlepointGAL <- function(x,param,eval.time=1,type="mu",log=FALSE) +{ + if(type=="mu") + { + (-eval.time*param[1]*param[3]+eval.time*param[4]*param[2]^2+x*param[3]- + (eval.time^2*param[1]^2*param[3]^2-2*eval.time*param[1]*param[3]^2*x+ + eval.time^2*param[4]^2*param[2]^4+x^2*param[3]^2+2*eval.time^2*param[1]^2* + param[2]^2-4*eval.time*param[1]*param[2]^2*x+2*x^2*param[2]^2)^(1/2))/ + param[2]^2/(eval.time*param[1]-x) + } + if(type=="kappa") + { + + } +} diff --git a/man/cfLM.Rd b/man/cfLM.Rd index f066e71..da84b05 100644 --- a/man/cfLM.Rd +++ b/man/cfLM.Rd @@ -2,7 +2,7 @@ \alias{cfLM} \title{Characteristic function of Laplace motion} \usage{ -cfLM(u, param, time, type = "mu", log = FALSE, start = 0) +cfLM(u, param, time = 1, type = "mu", log = FALSE, start = 0) } \arguments{ \item{u}{Transform variate} diff --git a/man/cgfEsscherGAL.Rd b/man/cgfEsscherGAL.Rd new file mode 100644 index 0000000..c41215c --- /dev/null +++ b/man/cgfEsscherGAL.Rd @@ -0,0 +1,31 @@ +\name{cgfEsscherGAL} +\alias{cgfEsscherGAL} +\title{Cumulant generating function of the +Esscher transform with parameter 1 of GAL distribution} +\usage{ +cgfEsscherGAL(u, param, eval.time = 1, type = "mu", log = FALSE) +} +\arguments{ + \item{u}{Transform variate} + + \item{param}{Parameter vector} + + \item{eval.time}{Time of the process} + + \item{type}{Choose between "mu" or "kappa" + parametrization} + + \item{log}{Logical for log-parameters} +} +\value{ +Cumulant generating function value at point u for given +parameter vector +} +\description{ +Cumulant generating function of the Esscher transform with +parameter 1 of GAL distribution +} +\author{ +Francois Pelletier +} + diff --git a/man/diffcgfEsscherGAL.Rd b/man/diffcgfEsscherGAL.Rd new file mode 100644 index 0000000..ecba26c --- /dev/null +++ b/man/diffcgfEsscherGAL.Rd @@ -0,0 +1,34 @@ +\name{diffcgfEsscherGAL} +\alias{diffcgfEsscherGAL} +\title{Differenciation of the cumulant generating fonction of the +Esscher transform with parameter 1 of the GAL distribution} +\usage{ +diffcgfEsscherGAL(u, order, param, eval.time = 1, type = "mu", + log = FALSE) +} +\arguments{ + \item{u}{Transform variate point of evaluation} + + \item{order}{Order of differenciation} + + \item{param}{Parameters of the GAL distirbution} + + \item{eval.time}{Time of the process} + + \item{type}{Choose between "mu" or "kappa" + parametrization} + + \item{log}{Logical for log-parameters} +} +\value{ +The value of the derivative at the transform variate point +of evaluation +} +\description{ +Differenciation of the cumulant generating fonction of the +Esscher transform with parameter 1 of the GAL distribution +} +\author{ +Francois Pelletier +} + diff --git a/man/diffcgfGAL.Rd b/man/diffcgfGAL.Rd new file mode 100644 index 0000000..410d2b4 --- /dev/null +++ b/man/diffcgfGAL.Rd @@ -0,0 +1,33 @@ +\name{diffcgfGAL} +\alias{diffcgfGAL} +\title{Differenciation of the cumulant generating fonction of the +GAL distribution} +\usage{ +diffcgfGAL(u, order, param, eval.time = 1, type = "mu", log = FALSE) +} +\arguments{ + \item{u}{Transform variate point of evaluation} + + \item{order}{Order of differenciation} + + \item{param}{Parameters of the GAL distirbution} + + \item{eval.time}{Time of the process} + + \item{type}{Choose between "mu" or "kappa" + parametrization} + + \item{log}{Logical for log-parameters} +} +\value{ +The value of the derivative at the transform variate point +of evaluation +} +\description{ +Differenciation of the cumulant generating fonction of the +GAL distribution +} +\author{ +Francois Pelletier +} + diff --git a/man/dnormapproxEsscherLM.Rd b/man/dnormapproxEsscherLM.Rd new file mode 100644 index 0000000..fa7228d --- /dev/null +++ b/man/dnormapproxEsscherLM.Rd @@ -0,0 +1,33 @@ +\name{dnormapproxEsscherLM} +\alias{dnormapproxEsscherLM} +\title{Normal approximation of the density function of the +Esscher transform of a Laplace Motion} +\usage{ +dnormapproxEsscherLM(x, param, hEsscher = 0, eval.time = 1, type = "mu", + log = FALSE, start = 0) +} +\arguments{ + \item{x}{vector of quantiles} + + \item{param}{Parameter vector} + + \item{hEsscher}{Esscher transform parameter} + + \item{eval.time}{Time of the process} + + \item{type}{Choose between "mu" or "kappa" + parametrization} + + \item{log}{Logical for log-parameters} + + \item{start}{Starting value of the process} +} +\value{ +Normal density function approximation of the Esscher +transform of the specified Laplace motion +} +\description{ +Normal approximation of the density function of the Esscher +transform of a Laplace Motion +} + diff --git a/man/dsaddleapproxGAL.Rd b/man/dsaddleapproxGAL.Rd new file mode 100644 index 0000000..c2f1ea4 --- /dev/null +++ b/man/dsaddleapproxGAL.Rd @@ -0,0 +1,27 @@ +\name{dsaddleapproxGAL} +\alias{dsaddleapproxGAL} +\title{Saddlepoint approximation of the density function of the +GAL distribution} +\usage{ +dsaddleapproxGAL(x, param, eval.time = 1, type = "mu", log = FALSE) +} +\arguments{ + \item{x}{vector of quantiles} + + \item{param}{Parameter vector} + + \item{eval.time}{Time of the process} + + \item{type}{Choose between "mu" or "kappa" + parametrization} + + \item{log}{Logical for log-parameters} +} +\value{ +Saddlepoint approximation of the density function +} +\description{ +Saddlepoint approximation of the density function of the +GAL distribution +} + diff --git a/man/pnormapproxEsscherLM.Rd b/man/pnormapproxEsscherLM.Rd new file mode 100644 index 0000000..2d51ff9 --- /dev/null +++ b/man/pnormapproxEsscherLM.Rd @@ -0,0 +1,32 @@ +\name{pnormapproxEsscherLM} +\alias{pnormapproxEsscherLM} +\title{Normal approximation of the distribution function of the +Esscher transform of a Laplace Motion} +\usage{ +pnormapproxEsscherLM(x, param, hEsscher = 0, eval.time = 1, type = "mu", + log = FALSE, start = 0) +} +\arguments{ + \item{x}{vector of quantiles} + + \item{param}{Parameter vector} + + \item{hEsscher}{Esscher transform parameter} + + \item{eval.time}{Time of the process} + + \item{type}{Choose between "mu" or "kappa" + parametrization} + + \item{log}{Logical for log-parameters} + + \item{start}{Starting value of the process} +} +\value{ +Normal distribution function approximation +} +\description{ +Normal approximation of the distribution function of the +Esscher transform of a Laplace Motion +} + diff --git a/man/psaddleapproxEsscherGAL.Rd b/man/psaddleapproxEsscherGAL.Rd new file mode 100644 index 0000000..dcb27a8 --- /dev/null +++ b/man/psaddleapproxEsscherGAL.Rd @@ -0,0 +1,27 @@ +\name{psaddleapproxEsscherGAL} +\alias{psaddleapproxEsscherGAL} +\title{Saddlepoint approximation of the distribution function of the Esscher +transform of the GAL distribution} +\usage{ +psaddleapproxEsscherGAL(x, param, eval.time = 1, type = "mu", log = FALSE) +} +\arguments{ + \item{x}{vector of quantiles} + + \item{param}{Parameter vector} + + \item{eval.time}{Time of the process} + + \item{type}{Choose between "mu" or "kappa" + parametrization} + + \item{log}{Logical for log-parameters} +} +\value{ +Saddlepoint approximation of the distribution function +} +\description{ +Saddlepoint approximation of the distribution function of +the Esscher transform of the GAL distribution +} + diff --git a/man/psaddleapproxGAL.Rd b/man/psaddleapproxGAL.Rd new file mode 100644 index 0000000..816c1b8 --- /dev/null +++ b/man/psaddleapproxGAL.Rd @@ -0,0 +1,27 @@ +\name{psaddleapproxGAL} +\alias{psaddleapproxGAL} +\title{Saddlepoint approximation of the distribution function of the +GAL distribution} +\usage{ +psaddleapproxGAL(x, param, eval.time = 1, type = "mu", log = FALSE) +} +\arguments{ + \item{x}{vector of quantiles} + + \item{param}{Parameter vector} + + \item{eval.time}{Time of the process} + + \item{type}{Choose between "mu" or "kappa" + parametrization} + + \item{log}{Logical for log-parameters} +} +\value{ +Saddlepoint approximation of the distribution function +} +\description{ +Saddlepoint approximation of the distribution function of +the GAL distribution +} + diff --git a/man/saddlepointEsscherGAL.Rd b/man/saddlepointEsscherGAL.Rd new file mode 100644 index 0000000..5a2ac37 --- /dev/null +++ b/man/saddlepointEsscherGAL.Rd @@ -0,0 +1,32 @@ +\name{saddlepointEsscherGAL} +\alias{saddlepointEsscherGAL} +\title{Evaluation of the saddlepoint of the Esscher transform with +parameter 1 of the GAL distribution for given quantiles} +\usage{ +saddlepointEsscherGAL(x, param, eval.time = 1, type = "mu", log = FALSE) +} +\arguments{ + \item{x}{vector of quantiles} + + \item{param}{Parameters of the underlying GAL + distribution} + + \item{eval.time}{Time of the process} + + \item{type}{Choose between "mu" or "kappa" + parametrization} + + \item{log}{Logical for log-parameters} +} +\value{ +The value of the saddlepoint for each point of the vector +of quantiles +} +\description{ +Evaluation of the saddlepoint of the Esscher transform with +parameter 1 of the GAL distribution for given quantiles +} +\author{ +Francois Pelletier +} + diff --git a/man/saddlepointGAL.Rd b/man/saddlepointGAL.Rd new file mode 100644 index 0000000..6ddd113 --- /dev/null +++ b/man/saddlepointGAL.Rd @@ -0,0 +1,30 @@ +\name{saddlepointGAL} +\alias{saddlepointGAL} +\title{Evaluation of the saddlepoint of the GAL distribution for given quantiles} +\usage{ +saddlepointGAL(x, param, eval.time = 1, type = "mu", log = FALSE) +} +\arguments{ + \item{x}{vector of quantiles} + + \item{param}{Parameters of the GAL distribution} + + \item{eval.time}{Time of the process} + + \item{type}{Choose between "mu" or "kappa" + parametrization} + + \item{log}{Logical for log-parameters} +} +\value{ +The value of the saddlepoint for each point of the vector +of quantiles +} +\description{ +Evaluation of the saddlepoint of the GAL distribution for +given quantiles +} +\author{ +Francois Pelletier +} +