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

mccull_pdf(x, theta, nu)
% mccull_pdf.m - evaluatess a McCullagh Probaility Density.
%   See "VGAM".
%
%   Vector form of PDF !!!
%
%  Created by Jim Huntley,  12/10/07
%

function [pdf] = mccull_pdf(x, theta, nu)

%persistent coef thetasq

%if(isempty(coef))
    coef = 1 / beta(nu+0.5,0.5);
    thetasq = theta^2;
%end

pdf = coef .* (1-x.^2).^(nu-0.5) ./ (1-2.*theta.*x+thetasq).^nu;

return

Contact us