cf_estimate_quantiles {CfEstimateQuantiles}R Documentation

Estimate quantiles of random variable

Description

Estimate quantiles of random variable using Cornish-Fisher expansion

Usage

cf_estimate_quantiles(cf_expansion_order, probabilities, cumulants)

Arguments

cf_expansion_order

order of CF expansion (= number of using cumulants)

probabilities

a numeric vector of probabilities

cumulants

a numeric vector of random variable cumulants

Value

a numeric vector of estimated quantiles

Author(s)

Maxim Yurchuk

Examples

cf_order = 8
cumulants = rep(0, cf_order);
for (i in 1:cf_order)
  cumulants[i] = (1/i)*factorial(i);  
probabilities = seq(0.01, 0.99, 0.05)
estimated_quantiles= cf_estimate_quantiles(cf_order, probabilities, cumulants)
plot(probabilities, estimated_quantiles, "l", 
  main = "Cornish-Fisher approximation for exp(1) with order = 8", 
  xlab = "Probability", ylab = "Quantile")

[Package CfEstimateQuantiles version 1.0 Index]