# NOT RUN {
size <- 10
ivec <- c(6, 14); avec <- c(8, 11); munb <- 10; xgrid <- 0:25
tvec <- 15; max.support <- 20; pobs.a <- 0.05; pstr.i <- 0.25
(ddd <- dgaitnbinom(xgrid, size, munb.p = munb, munb.a = munb + 5,
truncate = tvec, max.support = max.support, pobs.mix = pobs.a,
pobs.mlm = pobs.a, alt.mlm = avec,
pstr.mix = pstr.i, inf.mix = ivec))
# }
# NOT RUN {
plot(xgrid, ddd, type = "n", ylab = "Probability", xlab = "x",
main = "GAIT PNP Combo PMF---NB Parent")
mylwd <- 1
abline(v = avec, col = 'blue', lwd = mylwd)
abline(v = ivec, col = 'purple', lwd = mylwd)
abline(v = tvec, col = 'tan', lwd = mylwd)
abline(v = max.support, col = 'magenta', lwd = mylwd)
abline(h = c(pobs.a, pstr.i, 0:1), col = 'gray', lty = "dashed")
lines(xgrid, dnbinom(xgrid, size, mu = munb), col = 'gray', lty = 2)
lines(xgrid, ddd, type = "h", col = "pink", lwd = 7) # GAIT PNP combo PMF
points(xgrid[ddd == 0], ddd[ddd == 0], pch = 16)
# }
Run the code above in your browser using DataLab