Gram-Charlier approximation of the CDF using the first four moments.
pGC(x, moments = c(0,1,0,3), raw =TRUE, lower.tail =TRUE, log.p =FALSE)
Arguments
x: Vector of points to approximate the CDF in.
moments: The first four raw moments if raw=TRUE. By default the first four raw moments of the standard normal distribution are used. When raw=FALSE, the mean μ=E(X), variance σ2=E((X−μ)2), skewness (third standardised moment, ν=E((X−μ)3)/σ3) and kurtosis (fourth standardised moment, k=E((X−μ)4)/σ4).
raw: When TRUE (default), the first four raw moments are provided in moments. Otherwise, the mean, variance, skewness and kurtosis are provided in moments.
lower.tail: Logical indicating if the probabilities are of the form P(X≤x) (TRUE) or P(X>x) (FALSE). Default is TRUE.
log.p: Logical indicating if the probabilities are given as log(p), default is FALSE.
Details
Denote the standard normal PDF and CDF respectively by ϕ and Φ. Let μ be the first moment, σ2=E((X−μ)2) the variance, μ3=E((X−μ)3) the third central moment and μ4=E((X−μ)4) the fourth central moment of the random variable X. The corresponding cumulants are given by κ1=μ, κ2=σ2, κ3=μ3 and κ4=μ4−3σ4.
Now consider the random variable Z=(X−μ)/σ, which has cumulants 0, 1, ν=κ3/σ3 and k=κ4/σ4=μ4/σ4−3.
The Gram-Charlier approximation for the CDF of X (F(x)) is given by
F^GC(x)=Φ(z)+ϕ(z)(−ν/6h2(z)−k/24h3(z))
with h2(z)=z2−1, h3(z)=z3−3z and z=(x−μ)/σ.
See Section 6.2 of Albrecher et al. (2017) for more details.
Returns
Vector of estimates for the probabilities F(x)=P(X≤x).
References
Albrecher, H., Beirlant, J. and Teugels, J. (2017). Reinsurance: Actuarial and Statistical Aspects, Wiley, Chichester.
Cheah, P.K., Fraser, D.A.S. and Reid, N. (1993). "Some Alternatives to Edgeworth." The Canadian Journal of Statistics, 21(2), 131--138.