Library: | xplore |
See also: | quantile |
Quantlet: | cdf2quant | |
Description: | approximates the quantile from a cumulative distribution function (CDF) that is given on a grid. |
Usage: | q = cdf2quant(a,l) | |
Input: | ||
a | scalar, representing the probability level | |
l | a list containing: x - the grid in x y - the values of the CDF on the grid x | |
Output: | ||
q | scalar, the approximated quantile |
library("VaR") library("xplore") theta = 0 delta = #(1) lambda = #(0) par = list(theta,delta,lambda) r = VaRcdfDG(par,512,512,0.1) cdf2quant(0.95,r) qfn(0.95)
Approximates a standard normal quantile and compares it with the built-in function: Contents of q [1,] 1.6477 Contents of qfn [1,] 1.6449