代码之家  ›  专栏  ›  技术社区  ›  Yang Yang

` fidtist'错误消息:函数mle无法估计参数,错误代码为1

  •  0
  • Yang Yang  · 技术社区  · 6 年前

    我正在尝试使用来自 fidistplus的 fidist->code>功能,以使我的数据适合于burr分布。

    library(FitDistribplus)
    图书馆(精算师)
    
    fit<-fittdist(data=c(6,8,6,3,3,6,6,6,7,8,4,5,1,4,4,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”,disr=“burr”,
    开始=列表(shape1=0.3,shape2=1,rate=1)
    

    然后出现错误:

    灵感来源于发布的问题here,I notice that the error may be that my data contain 0 values,so I add 0.1 to all 0 values.

    fit-bur<-fidtist(data=c(6,8,6,3,3,6,6,6,7,8,4,5,1,4,4,0.1,0.1,0.1,7,5,6,6,5,3,4,8,6,5,6,3,6,5,5,4,3,6,5,4,3,9,4,2,4),method=“mle”,disr=“burr”,
    开始=列表(shape1=0.3,shape2=1,rate=1)
    
    
    

    但是,会出现不同的错误:

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

    然后出现错误: enter image description here

    受到问题的启发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))
    

    但是,会出现不同的错误: enter image description here

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

    1 回复  |  直到 6 年前
        1
  •  1
  •   Tom    6 年前

    尝试此代码,即使它会为标准错误提供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))