#159: gamrnd.m (in matlab/missing/stats): implement selection of alternative methods (3rd argument) --------------------------+------------------------------------------------- Reporter: sebastien | Owner: stepan Type: enhancement | Status: new Priority: minor | Milestone: 4.3 Component: Core M-files | Version: Keywords: | --------------------------+-------------------------------------------------
#159: gamrnd.m (in matlab/missing/stats): implement selection of alternative methods (3rd argument) ---------------------------+------------------------------------------------ Reporter: sebastien | Owner: stepan Type: enhancement | Status: new Priority: minor | Milestone: 4.3 Component: Core M-files | Version: Resolution: | Keywords: ---------------------------+------------------------------------------------
Comment(by sebastien):
''Suggestion from Johannes Pfeifer:''
To implement the alternative method, a simple way would be to add after line 51:
{{{ if nargin==3 if ~strcmpi(method,'BauwensLubranoRichard') Devroye.small = method; % 'Weibull' , 'Johnk' , 'Berman' , 'GS' , 'Best' Devroye.big = method; % 'Cheng' , 'Best' % REMARK 1: The first algorithm (Cheng) is still producing obviously wrong simulations. % REMARK 2: The second algorithm seems slightly slower than the algorithm advocated by Bauwens, % Lubrano and Richard, but the comparison depends on the value of a (this should be % investigated further). method = 'Devroye'; elseif strcmpi(method,'BauwensLubranoRichard') && any(a<1) disp('First input argument smaller than 1: Algorithm set to Devroye Best') method = 'Devroye'; Devroye.small = 'Best'; % 'Weibull' , 'Johnk' , 'Berman' , 'GS' , 'Best' % REMARK: The first algorithm (Weibull) is producing too much extreme values. end end }}}
#159: gamrnd.m (in matlab/missing/stats): implement selection of alternative methods (3rd argument) -------------------------+-------------------------------------------------- Reporter: sebastien | Owner: stepan Type: enhancement | Status: new Priority: minor | Milestone: 5.0 Component: General | Version: Keywords: | -------------------------+-------------------------------------------------- Changes (by sebastien):
* milestone: 4.3 => 5.0