[R] help error: In dweibull(x, shape, scale, log) : NaNs produzidos
David Winsemius
dwinsemius at comcast.net
Tue Feb 21 18:49:05 CET 2012
On Feb 21, 2012, at 11:43 AM, peter dalgaard wrote:
>
> On Feb 21, 2012, at 16:36 , David Winsemius wrote:
>
>> It suggests you managed to send negative or infinite numbers to
>> dweibull, a distribution which only supports values when given
>> positive, finite numbers. Look at your data more closely.
>
> Zeros are a common cause, too. For a < 1 (the shape parameter), the
> Weibull density has a singularity at zero, and fitdistr() is not
> tolerant of observations rounded to zero in such cases.
And that may be more correct than my guess. I see that the estimate
for the shape parameter from fitdistr is less than 1 and was
surprised that dweibull(-1, 2,2) does give a returned value of 0.
> dweibull(-.1, 0.61473436, 2.43536064 )
[1] 0
> dweibull(0, 0.61473436, 2.43536064 )
[1] Inf
> dweibull(0, 1.61473436, 2.43536064 )
[1] 0
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list