用R拟合化合物分布

时间:2018-07-04 13:52:19

标签: r distribution data-fitting

我正在尝试将复合分布(正态-泊松)适合给定数据:

d2<-c(5,2,1,3,0,0,8,0,4,0,9,1,0,3,15,0,0,0,10,10,16,10,5,10,10,5,5,0,0,0,0,0,0,0,0,0,0,0)

我的R代码如下:

library("fitdistrplus")
library("Compounding")
cc <- c("geometric","poisson","negativebinomial","binomial","logarithmic","binomialbinomial","binomialpoisson","poissonbinomial","neymantypea","polyaaeppli","poissonpascal","pascalpoisson","logarithmicbinomial","logarithmicpoisson","poissonlindley","hyperpoisson","yule","waring","kattitypeh1","kattitypeh2","neymantypeb","neymantypec","hypergeometric","thomas")
dd<-fitdist(d2,"Compound",fix.arg = list(parent="norm",compound="poisson",compoundDist=cc),start = list(params=3))

但是我收到一条错误消息:

Error in mledist(data, distname, start, fix.arg, ...) : 
  'fix.arg' must specify names which are arguments to 'distr'.

我尝试了各种解决方法,但似乎无济于事。我真的不明白我在这里想念的是什么。任何帮助将不胜感激!预先感谢!

0 个答案:

没有答案