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_pdf(x, m, phi, p, q)
% egb2_pdf.m - evaluates an Exponential Generalized Beta 2 Probability Density.
%   See "Some Flexible Parametric Models for Partially Adaptive Estimators
%   of Econometric Models", C.B. Hansen et al., 11 Oct., 2005.
%
%   Vector Form of PDF!!!
%
%  Created by Jim Huntley,  04/06/09
%

function [pdf] = egb2_pdf(x, m, phi, p, q)

%persistent bpq

%if(isempty(bpq))
    bpq = beta(p,q);
%end

arg = (x - m) ./ phi;
pdf = exp(p.*arg) ./ (phi.*bpq.*(1+exp(arg)).^(p+q));

return

Contact us