[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: consistent crash using gammrnd
From: |
John W. Eaton |
Subject: |
Re: consistent crash using gammrnd |
Date: |
Wed, 18 Jul 2007 12:32:01 -0500 |
On 16-Jul-2007, David Bateman wrote:
| David Bateman wrote:
| > Hermann wrote:
| >
| >> Am Samstag, 14. Juli 2007 schrieb Paul Kienzle:
| >>
| >>
| >>
| >>>> gamrnd(rand(100,1),rand(100,1))
| >>>>
| >>>>
| >>> The attached patch fixes the gamrnd bug ... it was doing
| >>> vector/vector rather than vector./vector.
| >>>
| >>>
| >> Hi,
| >> I$,1ry(Bm not sure, but maybe this should be .* instead of ./ ? I noted
that
| >> in 'help randg' it sais
| >>
| >> | This can be used to generate many distributions:
| >> |
| >> | `gamma (a, b)' for `a > -1', `b > 0'
| >> | r = b * randg (a)
| >>
| >>
| >>
| > Well, yes and no.. The current definition of gampdf, gamcdf and gamrnd
| > use a definition of 1/mu for the parameter B. So the current behavior of
| > gamrnd is consistent with gamcdf, gampdf and gaminv. Unfortunately this
| > seems to be the reverse of what is done in Matlab. For compatibility its
| > probably better to mimic the matlab behavior. Consider the attached
| > patch that changes the behavior to be consistent with matlab.. Note that
| > exppdf, etc are also concerned are they are really just special cases of
| > the gamma distributions.
| >
| > Do the other statistics functions have the same issues? I don't have the
| > statistics toolbox for matlab and so can't easily check...
| >
| > D.
| >
| Thinking about it further, there are the functions
| deprecated/exponential_* and deprecated/gamma_* that have effectively
| had their behavior changed due to patch I just sent. To preserve
| backward compatibility, the attached patch should also be applied.
OK, please check in this one too.
jwe
- consistent crash using gammrnd, Daniel Oberhoff, 2007/07/13
- Re: consistent crash using gammrnd, David Bateman, 2007/07/13
- Re: consistent crash using gammrnd, Paul Kienzle, 2007/07/13
- Re: consistent crash using gammrnd, John W. Eaton, 2007/07/18
- Re: consistent crash using gammrnd, David Bateman, 2007/07/18
- Re: consistent crash using gammrnd, Daniel Oberhoff, 2007/07/20
- Re: consistent crash using gammrnd, David Bateman, 2007/07/23
- Re: consistent crash using gammrnd, Daniel Oberhoff, 2007/07/23
- Re: consistent crash using gammrnd, David Bateman, 2007/07/23
- Re: consistent crash using gammrnd, Daniel Oberhoff, 2007/07/23
- Re: consistent crash using gammrnd, David Bateman, 2007/07/24