Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

 

generates random variates from over 870 univariate distributions

parlognor_cdf(x,alpha, bet, nu, tau)
% parlognor_cdf.m - compute Double Pareto Lognormal Cumulative Distribution Function.
%   See "The Double Pareto-Lognormal Distribution - A New Parameteric Model for Size Distributions", 
%   W. J. Reed and M. Jorgensen, U. Victoria. 
%   NOTE:  The CDF in this reference does not correspond to the PDF.  In fact, it can yield negative
%   values for small values of 'x'.  PDF appears to be correct and normalized.  So use numerical 
%   integration to get CDF.
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  09/06/06.
%

function [cdf] = parlognor_cdf(x,alpha, bet, nu, tau)

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(@parlognor_pdf,minx,x(jz),tol,trace,alpha, bet, nu, tau);
end

return



Contact us