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

betaspacy_cdf(x,a,b,e)
% betaspacy_cdf.m - compute Beta Spacy Cumulative Distribution Function.
%   See "Beta-Stacy Survival Regression Models",  F. Rigat and P. Muliere,
%   CRiSM Paper No.07-6, www.warwick.ac.uk/go/crism.
%
%   Vector Form of the CDF!!!
%
%  Created by Jim Huntley,  02/10/10
%

function [cdf] = betaspacy_cdf(x,a,b,e)

tol = 1e-8;
trace = [];
warning off MATLAB:quad:MinStepSize;

minx = min(x);

% Integrate PDF to get CDF.
warning off MATLAB:quad:MinStepSize
sz = size(x,2);
for jz = 1:sz
    cdf(jz) = quad(@betaspacy_pdf,minx,x(jz),tol,trace,a,b,e);
end

return



Contact us