Code covered by the BSD License  

Highlights from
Generation of Random Variates

image thumbnail

Generation of Random Variates

by

James Huntley (view profile)

 

generates random variates from over 870 univariate distributions

betnegbin_cdf(n,alpha,bet,gam)
% betnegbin_cdf.m - compute Beta Negative Binomial Cumulative Distribution Function.
%   See "Linearity of Regression for Non-Adjacent Weak Records", Wesolowski and Ahsanullah,
%   PolyTechnika Warsawska, Statistica Sinica, v.11, p. 39, 2001.                 
%
%  Created by:  Jim Huntley,  11/17/06.
%

function [cdf] = betnegbin_cdf(n,alpha,bet,gam)

sum1 = betnegbin_pdf(0, alpha, bet, gam);
for jn = 1:n
    sum1 = sum1 + betnegbin_pdf(jn, alpha, bet, gam);
end
cdf = sum1;

return



Contact us