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

asymsub_cdf(x, alpha, kappa, sigma, theta);
% asymsub_cdf.m - compute Asymmetric Subbotin Cumulative Distribution Function.
%   See "Macroeconomic Fluctuations and the Firms' Rate of Growth Distribution:
%   Evidence from US and UK Quoted Companies," E. Santoro, Cambridge, Oct., 2006.
%
%   Vector form of CDF!!!
%
%  Created by:  Jim Huntley,  03/30/05.
%

function [cdf] = asymsub_cdf(x, alpha, kappa, sigma, theta);

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(@asymsub_pdf,minx,x(jz),tol,trace,alpha,kappa,sigma,theta);
end

return



Contact us