# Loading the package
library(plpoisson)
set.seed(2020L)
# Number of observed time windows
n <- 555L
# Simulating a dataset
data <- cbind.data.frame(
occ_obs = rpois(n, rgamma(n, 5.5, .5)),
win_siz = rgamma(n, 1.44, .777)
)
## Frequentist prediction limits
poiss(sum(data$occ_obs), # Past occurrencies
nrow(data), # Total past time windows
mean(data$win_siz), # Window size
3) # Size of future window
Run the code above in your browser using DataLab