【问题标题】:`fitdist` error message: the function mle failed to estimate the parameters, with the error code 1`fitdist` 错误信息:函数 mle 无法估计参数,错误代码为 1
【发布时间】:2018-12-01 01:56:56
【问题描述】:

我正在尝试使用 fitdistrplus 包中的 fitdist 函数来使我的数据适合 Burr 分布。

library(fitdistrplus)     
library(actuar)

fit_bur <- fitdist(data=c(6,8,6,3,3,6,6,6,7,8,4,5,1,4,4,0,0,0,0,7,5,6,6,5,3,4,8,6,5,6,3,6,5,4,3,9,4,2,4), method = "mle",distr="burr", 
               start = list(shape1 = 0.3, shape2 = 1, rate = 1))

然后出现错误:

here 发布的问题启发,我注意到错误可能是我的数据包含 0 值,因此我将 0.1 添加到所有 0 值。

fit_bur <- fitdist(data=c(6,8,6,3,3,6,6,6,7,8,4,5,1,4,4,0.1,0.1,0.1,0.1,7,5,6,6,5,3,4,8,6,5,6,3,6,5,4,3,9,4,2,4),  method = "mle",distr="burr", 
               start = list(shape1 = 0.3, shape2 = 1, rate = 1))

但是,会发生不同的错误:

这个问题有什么解决办法吗?感谢您的帮助。

【问题讨论】:

    标签: r distribution fitdistrplus


    【解决方案1】:

    试试这个代码,即使它会给你 NA 标准错误:

    data_you <- c(6,8,6,3,3,6,6,6,7,8,4,5,1,4,4,0.1,0.1,0.1,0.1,7,5,6,6,5,3,4,8,6,5,6,3,6,5,4,3,9,4,2,4)
    
    fit_bur <- fitdist(data_you,"burr", start = list(shape1 = 0.3, shape2 = 1, rate = 1),lower=c(0,0))
    

    【讨论】:

      猜你喜欢
      • 2021-05-01
      • 2022-01-02
      • 2019-03-14
      • 1970-01-01
      • 2019-03-14
      • 2011-02-11
      • 1970-01-01
      • 1970-01-01
      • 2021-09-23
      相关资源
      最近更新 更多