# NOT RUN {
lambda <- 3; pobs1 <- 0.30; x <- (-1):7
doapospois(x, lambda = lambda, pobs1 = pobs1)
table(roapospois(100, lambda = lambda, pobs1 = pobs1))
# }
# NOT RUN {
x <- 0:10
barplot(rbind(doapospois(x, lambda = lambda, pobs1 = pobs1),
dpospois(x, lambda = lambda)),
beside = TRUE, col = c("blue", "orange"), cex.main = 0.7, las = 1,
ylab = "Probability", names.arg = as.character(x),
main = paste("OAPP(lambda = ", lambda, ", pobs1 = ", pobs1,
") [blue] vs", " PosPoisson(lambda = ", lambda,
") [orange] densities", sep = ""))
# }
Run the code above in your browser using DataLab