[R] Optimization failed in fitdistr (Weibull distribution)
Berend Hasselman
bhh at xs4all.nl
Mon Oct 28 16:24:16 CET 2013
On 28-10-2013, at 16:07, Rui Barradas <ruipbarradas at sapo.pt> wrote:
> Hello,
>
> I can't reproduce your error:
>
> windfreq <-
> c(1351L, 2147L, 3317L, 4378L, 5527L, 6667L, 7865L, 8970L, 9987L,
> 10907L, 11905L, 12642L, 131000L, 14983L, 15847L, 16842L, 17757L,
> 18698L, 19632L, 20626L, 21599L, 22529L, 23325L, 24391L, 25356L,
> 26267L, 27230L, 28223L, 29190L, 30142L, 31124L, 32104L, 3397L,
> 3437L, 3562L, 3646L, 3742L, 3824L, 399L, 4013L, 419L, 425L, 432L
>
> library(MASS)
>
> fitdistr(windfreq, "weibull")
You seem to have collapsed the two columns of data into a single column.
That's why it works for you.
The OP should use the dput function to show the data.
If I take the data as presented I get the same error (but I don't use sep="," since the data displayed don't contain a ,).
And show the actual code used such as library(MASS).
Berend
More information about the R-help
mailing list