# NOT RUN {
avec <- c(5, 10) # Alter these (special) values
ivec <- c(15, 20) # Inflate these (special) values
tvec <- 0 # Truncate this (special) value
pobs.a <- c(0.1, 0.2)
pstr.i <- c(0.1, 0.1); size <- 3; munb <- 15; x <- 0:22
y <- rgaitnbinom.mlm(1000, size, munb = munb, alter = avec,
inflate = ivec, truncate = tvec, max.support = 20,
pstr.i = pstr.i, pobs.a = pobs.a, byrow = TRUE)
table(y)
(pmf <- dgaitnbinom.mlm(x, size, munb = munb, alter = avec,
inflate = ivec, truncate = tvec, max.support = 20,
pstr.i = pstr.i, pobs.a = pobs.a, byrow = TRUE))
# }
# NOT RUN {
plot(x, pmf, type = "h", col = "blue", las = 1,
main = "Heaped data that is also upper-truncated")
# }
Run the code above in your browser using DataLab