View source: R/cfX_LogNormal.R
| cfX_LogNormal | R Documentation |
cfX_LogNormal(t, mu, sigma, tol) computes the characteristic function cf(t)
of the Lognormal distribution with parameters mu (real) and sigma > 0, computed for real (vector) argument t, i.e.
cf(t) = cfX_LogNormal(t,mu,sigma).
cfX_LogNormal(t, mu = 0, sigma = 1, tol = 1e-06)
t |
vector or array of real values, where the CF is evaluated. |
mu |
real, default value |
sigma |
> 0, default value |
tol |
tolerance, default value |
In probability theory, a log-normal (or lognormal) distribution is a
continuous probability distribution of a random variable whose logarithm
is normally distributed. The lognormal distribution is defined for x in
(0,+inf) by its PDF/CDF/CF, as follows
pdf(x) = 1/(x*\sigma*sqrt(2*pi))*exp(-(ln(x)-\mu)^2/(2*\sigma^2))
cdf(x) = 1/2+1/2*erf((ln(x)-\mu)/(sqrt(2)*\sigma))
cf(t) = sum_0^infinity{(it)^n/n!*exp(n*\mu + (n*\sigma)^2/2)}.
As noted, this representation is asymptotically divergent but sufficient
for numerical purposes.
cfX_LogNormal is based on the standard integral representation of the
characteristic function of the lognormal distribution, i.e.
cf(t) = Integral_0^inf exp(i*t*x) * PDF(x) dx.
By using the half-space Fourier integral transformation we get
cf(t) = Integral_0^inf (i/t) * exp(-x) * PDF(i*x/t) dx.
If we define the integrand as funCF(t,x) = (i/t) * exp(-x) * PDF(i*x/t),
then by using a stabilizing transformation from [0,inf] to [0,1], we can
evaluate the CF by the following (well behaved) integral:
cf(t) = Integral_0^1 2x/(1-x)^3 * funCF(t,(x/(1-x))^2) dx.
cfX_LogNormal evaluates this integral by using the R built in
function integrate(), with precission specified by tolerance tol (default
value is tol = 1e-6).
Characteristic function cf(t) of the Lognormal distribution.
Ver.: 16-Sep-2018 19:26:07 (consistent with Matlab CharFunTool v1.3.0, 15-Nov-2016 13:36:26).
[1] WITKOVSKY, V.: On the exact computation of the density and of the quantiles of linear combinations of t and F random variables. Journal of Statistical Planning and Inference 94 (2001), 1-13.
[2] WITKOVSKY V. (2016). Numerical inversion of a characteristic function: An alternative tool to form the probability distribution of output quantity in linear measurement models. Acta IMEKO, 5(3), 32-44.
[3] WITKOVSKY V., WIMMER G., DUBY T. (2016). Computing the aggregate loss distribution based on numerical inversion of the compound empirical characteristic function of frequency and severity. Working Paper. Insurance: Mathematics and Economics.
[4] DUBY T., WIMMER G., WITKOVSKY V.(2016). MATLAB toolbox CRM for computing distributions of collective risk models. Working Paper. Journal of Statistical Software.
For more details see WIKIPEDIA: https://en.wikipedia.org/wiki/Log-normal_distribution.
Other Continuous Probability Distribution:
cfS_Arcsine(),
cfS_Beta(),
cfS_Gaussian(),
cfS_Laplace(),
cfS_Rectangular(),
cfS_Student(),
cfS_TSP(),
cfS_Trapezoidal(),
cfS_Triangular(),
cfS_Wigner(),
cfX_ChiSquare(),
cfX_Exponential(),
cfX_FisherSnedecor(),
cfX_Gamma(),
cfX_InverseGamma(),
cf_ArcsineSymmetric(),
cf_BetaNC(),
cf_BetaSymmetric(),
cf_Beta(),
cf_ChiSquare(),
cf_Exponential(),
cf_FisherSnedecorNC(),
cf_FisherSnedecor(),
cf_Gamma(),
cf_InverseGamma(),
cf_Laplace(),
cf_LogRV_BetaNC(),
cf_LogRV_Beta(),
cf_LogRV_ChiSquareNC(),
cf_LogRV_ChiSquare(),
cf_LogRV_FisherSnedecorNC(),
cf_LogRV_FisherSnedecor(),
cf_LogRV_MeansRatioW(),
cf_LogRV_MeansRatio(),
cf_LogRV_WilksLambdaNC(),
cf_LogRV_WilksLambda(),
cf_Normal(),
cf_RectangularSymmetric(),
cf_Student(),
cf_TSPSymmetric(),
cf_TrapezoidalSymmetric(),
cf_TriangularSymmetric(),
cf_vonMises()
## EXAMPLE1
# CF of the Lognormal distribution with mu = 0,sigma = 1
mu <- 0
sigma <- 1
t <- seq(-20, 20, length.out = 2 ^ 10 + 1)
plotReIm(function(t)
cfX_LogNormal(t, mu, sigma),
t,
title = "Characteristic function of the Lognormal distribution")
## EXAMPLE2
# CDF/PDF of the Lognormal distribution with mu = 0,sigma = 1
mu <- 0
sigma <- 1
x <- seq(0, 15, length.out = 101)
prob <- c(0.9, 0.95, 0.99)
cf <- function(t)
cfX_LogNormal(t, mu, sigma)
options <- list()
options$xMin <- 0
options$N <- 2 ^ 13
options$SixSigmaRule <- 8
result <- cf2DistGP(cf, x, prob, options)
## EXAMPLE3
# PDF/CDF of the compound Poisson-Lognormal distribution
mu <- 0
sigma <- 1
lambda <- 10
x <- seq(0, 70, length.out = 101)
prob <- c(0.9, 0.95, 0.99)
cfX <- function(t)
cfX_LogNormal(t, mu, sigma)
cf <- function(t)
cfN_Poisson(t, lambda, cfX)
options <- list()
options$isCompound <- TRUE
result <- cf2DistGP(cf, x, prob, options)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.