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

invgammix_pdf.m
% invgammix_pdf.m - evaluates an Inverse Gamma Mixing Probability Density.
%   See "On Excess-of-Loss Reinsurance", H. Albrecher and J.L. Teugels,
%   Teor. ?Imovir. ta Matem. Statyst. Vip. 79, 2008, stor. 519 No. 79,
%   2008, pp. 519,
%   http://www.nbuv.gov.ua/portal/natural/Tims/2008_79/079-2.pdf.
%
%   Vector form of the PDF!!!
%
%   Created by Jim Huntley,  11/20/09
%

function [pdf] = invgammix_pdf(x, alpha, mu)

%persistent coef

%if(isempty(coef))
    coef = exp(alpha*log(mu) - gammaln(alpha));
%end

pdf = coef .* x.^(-alpha-1) .* exp(-mu./x);

return

Contact us