[R] Optimization failed in fitdistr (Weibull distribution)

kmmoon100 k.moon at student.unimelb.edu.au
Mon Oct 28 13:07:07 CET 2013


Hello everyone,

This is Kangmin.

I am trying to produce shape and scale of my wind data. My data is based on
wind speed frequency with 1km/hr increment. data is described below.

Windspeed (km/h)    Frequency
1	351
2	147
3	317
4	378
5	527
6	667
7	865
8	970
9	987
10	907
11	905
12	642
13	1000
14	983
15	847
16	842
17	757
18	698
19	632
20	626
21	599
22	529
23	325
24	391
25	356
26	267
27	230
28	223
29	190
30	142
31	124
32	104
33	97
34	37
35	62
36	46
37	42
38	24
39	9
40	13
41	9
42	5
43	2

R codes to calculate shape and scale are described below:

Pine.windfrequency.4weeks<-read.table("C:/Users/kmoon/Documents/Pine_frequency_4weeks.csv",header=TRUE,sep=",")
fitdistr(Pine.windfrequency.4weeks$Frequency, densfun="weibull")

I have got an error message when I was using 'fitdistr' function

"Error in fitdistr(Pine.windfrequency.4weeks$Frequency, densfun = "weibull")
: 
  optimization failed"

Please help me calculating shape and scale of weibull distribution.

And please understand that I am not an user familiar with R program but I am
really trying to make my analysis work on R!

Thank you!!!

Kangmin.



--
View this message in context: http://r.789695.n4.nabble.com/Optimization-failed-in-fitdistr-Weibull-distribution-tp4679167.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list