Library: | VaR |
See also: | VaRcharfDG |
Quantlet: | VaRcdfDG | |
Description: | approximates the cumulative distribution function (CDF) for the class of quadratic forms of Gaussian vectors. |
Usage: | r = VaRcdfDG(l,N,K,dt) | |
Input: | ||
l | a list containing (at least) the components: theta - the constant delta - the linear term lambda - the diagonal of the quadratic terms | |
N | scalar, modulus of the FFT, should have a power of 2 | |
K | scalar, number of characteristic function evaluations; K<=N | |
dt | scalar, grid-length in t to use for the approximation | |
Output: | ||
r | a list containing the two components: x - the grid (vector) in x y - the values of the CDF on the grid x |
library("plot") library("VaR") proc() = VaRcdfDGtest(par,N,dt) l = VaRcdfDG(par,N,N,dt) z = setmask(l.x~l.y, "line") plot(z) endp theta = 0 delta = #(0) lambda = #(1.4142) par = list(theta,delta,lambda) VaRcdfDGtest(par,1024,0.2)
Plots the CDF of a distribution, which is close to the chi^2 distribution with one degree of freedom.