我正在使用fitdistr()查找Weibull和Gamma分布的MLE,同时不断看到这两个错误
# 2. Gamma distribution function (alpha, beta)
> j = 13
> for (i in 1:12){
+ month_temp = input_data[,3]
+ index = month_temp == i
+ month_temp = input_data[index,5]
+
+ par_gam = gamma_fit(month_temp, option = FALSE)
+ par_matrix[j,1] = i
+ par_matrix[j,2] = 2
+ par_matrix[j, 3:4] = par_gam[1:2]
+ par_matrix[j, 8:9] = par_gam[3:4]
+ j = j + 1
+
+ }
Error in stats::optim(x = c(95, 9185, 18095, 5, 9215, 1325, 8840, 440, :
non-finite finite-difference value [2]
In addition: There were 50 or more warnings (use warnings() to see the first 50)