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

genlogn_pdf(x, tau, sigma, mu)
% genlogn_pdf.m - evaluates a Generalized Lognormal Probability Density.
%   See "The Generalized Lognormal Distribution as an Income Distribution", 
%   C. Kleiber and S. Scheid, Dortmund,.               
%
%               Vector Form of CDF !!!
%
%  Created by:  Jim Huntley,  10/30/08.
%

function[pdf] = genlogn_pdf(x, tau, sigma, mu)

%persistent coef denom

%if(isempty(coef))
    coef = (log(0.5) - (log(tau)/tau+log(sigma)+gammaln(1+(1/tau))));
    denom = 1 / (tau*sigma^tau);
%end

pdf =  exp(coef - denom.*(abs(log(x)-mu)).^tau - log(x));

return



Contact us