我正在尝试找到一个发行版。通过使用 mledist 功能。但是每次我使用它时,我都会发现一条错误消息:
[1] "Error in optim(par = vstart, fn = fnobj, fix.arg = fix.arg, obs = data, : \n non-finite finite-difference value [2]\n"
attr(,"class")
[1] "try-error"
attr(,"condition")
<simpleError in optim(par = vstart, fn = fnobj, fix.arg = fix.arg, obs = data, ddistnam = ddistname, hessian = TRUE, method = meth, lower = lower, upper = upper, ...): non-finite finite-difference value [2]>
问题是我知道,“Alae”有一个帕累托分布,但我不明白我的错误在哪里。请帮助:) 这是我的代码
library(fitdistrplus)
library(CASdatasets)
data(lossalae)
pertes<-lossalae
Alae <- pertes$ALAE
Alae_par <- mledist(Alae, 'pareto',start=c(shape=5,scale=2))
TNX