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

amoroso_pdf(x, a, alpha, bet, theta, xtrem)
% amoroso_pdf.m - evaluates an Amoroso Probability Density.
%   See "The Amoroso Distribution", G. E. Crooks, Tech. Note 003v5 (2010-01-14)
%   http://threeplusone.com/pubs/technote/CrooksTechNote003.pdf.
%
%   Vector form of the PDF!!!
%
%  Created by Jim Huntley,  02/17/10
%

function [pdf] = amoroso_pdf(x, a, alpha, bet, theta, xtrem)

%persistent coef

%if(isempty(coef))
    coef = exp(log(abs(bet/theta)) - gammaln(alpha));
%end

argx = (x-a) ./ theta;
pdf = coef .* argx.^(alpha*bet-1) .* exp(-(argx.^bet));

return

Contact us