I am trying to fit a compound distribution (Normal - Poisson) to a given data:
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)
My R code is as follows:
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))
But I get an error message saying:
Error in mledist(data, distname, start, fix.arg, ...) :
'fix.arg' must specify names which are arguments to 'distr'.
I've tried all sorts of workarounds but nothing seems to work. I really don't understand what I'm missing here. Any help would be highly appreciated! Thanks in advance!