Re: [Rd] Problem with fitdistr for gamma in R 2.2.0

2005-12-06 Thread Prof Brian Ripley
The problem lies in dgamma, the function which is stated to be implicated. See the following NEWS item: o [dpqr]gamma now returns NaN for an invalid 'shape' parameter (rather than throw an error), for consistency with other distribution functions. That setting lower/upper w

Re: [Rd] Problem with fitdistr for gamma in R 2.2.0

2005-11-17 Thread Gregor Gorjanc
Thanks to both Peters for involvment. I will add argument for method to be used in optim. -- Lep pozdrav / With regards, Gregor Gorjanc -- University of Ljubljana PhD student Biotechnical Faculty Zootechnical Department

Re: [Rd] Problem with fitdistr for gamma in R 2.2.0

2005-11-17 Thread P Ehlers
I think the problem may lie with fitdistr(). Specifically, replacing the code in fitdistr.R (VR_7.2-20) (line 137 to end) with the code in VR_7.2-8 (line 92 to end) seems to handle fitdistr(otm, "gamma") just fine. But I haven't done much testing. Peter Ehlers Peter Dalgaard wrote: > P Ehler

Re: [Rd] Problem with fitdistr for gamma in R 2.2.0

2005-11-17 Thread Peter Dalgaard
P Ehlers <[EMAIL PROTECTED]> writes: > Gregor, > > fitdistr(otm, "gamma", method="L-BFGS-B") > > works for me (on WinXP). Or you could specify "lower = 0". The really odd thing is that it even works with > fitdistr(otm, "gamma",lower=-Inf) shape rate 1.03081094 0.18924370

Re: [Rd] Problem with fitdistr for gamma in R 2.2.0

2005-11-17 Thread P Ehlers
Gregor, fitdistr(otm, "gamma", method="L-BFGS-B") works for me (on WinXP). Or you could specify "lower = 0". I no longer have 2.1.0 running, so I don't know why this wasn't needed in 2.1.0. "R version 2.2.0, 2005-10-24" MASS version: 7.2-20 -peter Gorjanc Gregor wrote: > Dear R developers,

[Rd] Problem with fitdistr for gamma in R 2.2.0

2005-11-17 Thread Gorjanc Gregor
Dear R developers, I have encountered strange behaviour of fitdistr for gamma in recent R build i.e. 2.2.0. I have attached the code for data at the end of this mail so you can reproduce the problem. In short, I am able to run fitdistr under 2.1.0 without problems, while I get the following error