Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates



generates random variates from over 870 univariate distributions

boxcoxt_cdf(x, mu, sigma, nu, tau)
% boxcoxt_cdf.m - compute Box Cox T Cumulative Distribution Function.
%   See BCT, "The GAMLSS Package", 
%, p.12.                
%  Created by:  Jim Huntley,  11/19/07.

function [cdf] = boxcoxt_cdf(x, mu, sigma, 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(@boxcoxt_pdf,minx,x(jz),tol,trace,mu,sigma,nu,tau);


Contact us