Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

snvg_cdf(x,delta,c,lambda)
% snvg_cdf.m - compute Symmetric Normal Variance Gamma Cumulative Distribution Function.
%   See "Tests of Fit for Symmetric Variance Gamma Distributions", F. Kostas,
%   15th European Young Statisticians Meeting, Sept 10-14, 2007.               
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  08/14/07.
%

function [cdf] = snvg_cdf(x,delta,c,lambda)

tol = 1e-8;
trace = [];
warning off MATLAB:quad:MinStepSize;

minx = min(x);

% Integrate PDF to get CDF.
warning off MATLAB:quad:MinStepSize
sz = size(x,2);
for jz = 1:sz
    cdf(jz) = quad(@snvg_pdf,minx,x(jz),tol,trace,delta,c,lambda);
end

return



Contact us