[R] help error: In dweibull(x, shape, scale, log) : NaNs produzidos

R. Michael Weylandt <michael.weylandt@gmail.com> michael.weylandt at gmail.com
Tue Feb 21 21:04:53 CET 2012


I haven't quite worked it out for the Wiebull but that will certainly (down-) bias your variance estimates for, e.g., the normal. 

I think the right thing to do is to use the correct distribution rather than forcing an incorrect distribution to fit incorrectly. 

Michael

On Feb 21, 2012, at 1:10 PM, Vanúcia Schumacher<vanucia-schumacher at hotmail.com> wrote:

> 
> Hi,
> then, If I replace the midpoint 0.0025 average values equal to 0there won't be prejudice in the results?Would then be the best thing to do?
> 
> regards,
> 
> 
> 
>> Subject: Re: [R] help  error: In dweibull(x, shape, scale, log) : NaNs produzidos
>> From: pdalgd at gmail.com
>> Date: Tue, 21 Feb 2012 18:55:51 +0100
>> To: vanucia-schumacher at hotmail.com
>> 
>> 
>> On Feb 21, 2012, at 18:34 , Van�cia Schumacher wrote:
>> 
>>> Thank's,
>>> 
>>> but then I could simply round off my data which are equal to zero to 0.00001?
>> 
>> Something like that. I'd maybe try something a little more carefully considered. E.g. if your data are rounded to two decimal figures, the "zeros" represent values of x with
>> 
>> 0 < x < 0.005 
>> 
>> since anything bigger would be rounded to 0.01. So replace with the interval midpoint of  0.0025. 
>> 
>> (One can do better by modifying the likelihood, but then you essentially have to rewrite fitdistr().)
>> 
>>> 
>>> Att,
>>> 
>>> Van�cia Schumacher
>>> Curso de gradua��o em meteorologia - UFPEL
>>> Bolsista do Programa de Educa��o Tutorial - PET
>>> 
>>> 
>>>> Subject: Re: [R] help error: In dweibull(x, shape, scale, log) : NaNs produzidos
>>>> From: pdalgd at gmail.com
>>>> Date: Tue, 21 Feb 2012 17:43:07 +0100
>>>> CC: vanucia-schumacher at hotmail.com; r-help at r-project.org
>>>> To: dwinsemius at comcast.net
>>>> 
>>>> 
>>>> 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.
>>>> 
>>>> -- 
>>>> Peter Dalgaard, Professor
>>>> Center for Statistics, Copenhagen Business School
>>>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>>>> Phone: (+45)38153501
>>>> Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
>>>> 
>> 
>> -- 
>> Peter Dalgaard, Professor
>> Center for Statistics, Copenhagen Business School
>> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
>> Phone: (+45)38153501
>> Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
>> 
>                         
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list