pEdge {ReIns} | R Documentation |
Edgeworth approximation
Description
Edgeworth approximation of the CDF using the first four moments.
Usage
pEdge(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 |
When |
lower.tail |
Logical indicating if the probabilities are of the form |
log.p |
Logical indicating if the probabilities are given as |
Details
Denote the standard normal PDF and CDF respectively by and
.
Let
be the first moment,
the variance,
the third central moment and
the fourth central moment of the random variable
.
The corresponding cumulants are given by
,
,
and
.
Now consider the random variable , which has cumulants
0, 1,
and
.
The Edgeworth approximation for the CDF of (
) is given by
with ,
,
and
.
See Section 6.2 of Albrecher et al. (2017) for more details.
Value
Vector of estimates for the probabilities .
Author(s)
Tom Reynkens
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.
See Also
Examples
# Chi-squared sample
X <- rchisq(1000, 2)
x <- seq(0, 10, 0.01)
# Empirical moments
moments = c(mean(X), mean(X^2), mean(X^3), mean(X^4))
# Gram-Charlier approximation
p1 <- pGC(x, moments)
# Edgeworth approximation
p2 <- pEdge(x, moments)
# Normal approximation
p3 <- pClas(x, mean(X), var(X))
# True probabilities
p <- pchisq(x, 2)
# Plot true and estimated probabilities
plot(x, p, type="l", ylab="F(x)", ylim=c(0,1), col="red")
lines(x, p1, lty=2)
lines(x, p2, lty=3)
lines(x, p3, lty=4, col="blue")
legend("bottomright", c("True CDF", "GC approximation",
"Edgeworth approximation", "Normal approximation"),
col=c("red", "black", "black", "blue"), lty=1:4, lwd=2)