library(wle)
set.seed(1234)
x <- rnbinom(20, size=10, prob=0.2)
wle.negativebinomial(x, size=10)
x <- c(rnbinom(20, size=10, prob=0.2),rnbinom(10, size=10, p=0.9))
result <- wle.negativebinomial(x, size=10)
print(result)
plot(result$weights)
Run the code above in your browser using DataLab