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

boxcox_cdf(x,sigma,mu,nu)
% boxcox_cdf.m - compute BoxCox Cumulative Distribution Function.
%   See "The Gamlss Package", at
%   "http://cran.r-project.org/doc/packages/gamlss.pdf"
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  07/17/06.
%

function [cdf] = boxcox_cdf(x,sigma,mu,nu)

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(@boxcox_pdf,minx,x(jz),tol,trace,sigma,mu,nu);
end

return



Contact us