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

egb2_cdf(x,m,phi,p,q)
% egb2_cdf.m - compute Exponential Generalized Beta 2 Cumulative Distribution Function.
%   See "Some Flexible Parametric Models for Partially Adaptive Estimators
%   of Econometric Models", C.B. Hansen et al., 11 Oct., 2005.
%
%   Vector Form of CDF!!!
%
%  Created by:  Jim Huntley,  04/08/09.
%

function [cdf] = egb2_cdf(x,m,phi,p,q)

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(@egb2_pdf,minx,x(jz),tol,trace,m,phi,p,q);
end

return



Contact us