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

invhypsin_cdf(x,mu,sigma,k,lambda)
% invhypsin_cdf.m - compute Inverse Hyperbolic Sine 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] = invhypsin_cdf(x,mu,sigma,k,lambda)

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(@invhypsin_pdf,minx,x(jz),tol,trace,mu,sigma,k,lambda);
end

return



Contact us