0

我正在尝试将某个截断的分布拟合到数据集。例如,对于对数正态分布,我将截断分布的密度函数定义为:

dtlnorm <- function(x, meanlog, sdlog,low) 
  dlnorm(x,meanlog,sdlog)/(1-plnorm(low,meanlog,sdlog))* (x >= low)

其中low是截断点。

我的数据是以下向量

Data <- c(1068295.00589834, 1406446.49289834, 1540330.78489834, 1152321.94489834, 
3108649.66189834, 3718417.97089834, 2981945.18089834, 4552923.31989834, 
5747260.98289834, 2105461.57989834, 1044515.95889834, 1133641.75289834, 
3847920.72789834, 2536441.02989834, 3073854.15789834, 1591039.28389834, 
2592446.73289834, 4989152.55189834, 2426457.45489834, 120265066.499898, 
6888222046.1999, 1092811.87089834, 3440123.51689834, 74684298.1398983, 
1475038.27689834, 1124226.39489834, 11739544.5798983, 1187688.74489834, 
1023193.88789834, 18784663.9698983)

为了适应分布,我写:

fitdist(Data,distr="tlnorm",method="mle",start = list(meanlog=0,sdlog=0),fix.arg = list(low=100))

但是会出现以下错误:

Error in fitdist(Data, distr = "tlnorm", method = "mle", start = list(meanlog = 0,  : 
the function mle failed to estimate the parameters, 
            with the error code 100

我不知道发生了什么。有人可以帮助我吗?谢谢!

4

0 回答 0