Um texto embutido e sem conjunto de caracteres especificado foi limpo... Nome: n?o dispon?vel Url: <https://stat.ethz.ch/pipermail/r-help/attachments/20120221/5762d16c/attachment.pl>
help error: In dweibull(x, shape, scale, log) : NaNs produzidos
5 messages · Vanúcia Schumacher, David Winsemius, Peter Dalgaard
Um texto embutido e sem conjunto de caracteres especificado foi limpo... Nome: n?o dispon?vel Url: <https://stat.ethz.ch/pipermail/r-help/attachments/20120221/9c425650/attachment.pl>
On Feb 21, 2012, at 9:24 AM, Van?cia Schumacher wrote:
Guys,
I'm having an error when I use the command:
library(MASS)> dados<-read.table("inverno.txt",header=FALSE)>
vento50<-fitdistr(dados[[1]],densfun="weibull")Mensagens de aviso
perdidas:1: In dweibull(x, shape, scale, log) : NaNs produzidos2: In
dweibull(x, shape, scale, log) : NaNs produzidos3: In dweibull(x,
shape, scale, log) : NaNs produzidos4: In dweibull(x, shape, scale,
log) : NaNs produzidos5: In dweibull(x, shape, scale, log) : NaNs
produzidos6: In dweibull(x, shape, scale, log) : NaNs produzidos>
vento50 shape scale 0.61473436 2.43536064
(0.01895222) (0.13202750)
It's not an error, it's only a warning, at least to the level of my ability to read Spanish. 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. And learn to post in plain text. HTML does a poor job of communication.
David Winsemius, MD West Hartford, CT
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
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