poisJEFF: Bayesian Prediction Limits for Poisson Distribution (Jeffreys...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/poisJEFF.R

Description

The function provides the Bayesian prediction limits of a Poisson random variable derived based on a Jeffreys prior. The resulting prediction bounds quantify the uncertainty associated to the predicted future number of occurences in a time windows of size t.

Usage

1
poisJEFF(xobs, n, s, t, alpha = 0.05)

Arguments

xobs

a numeric value denoting the number of the observed occurrencies.

n

a numeric value representing the total number of the time windows s in the past (observed time windows).

s

a numeric value corresponding to the fixed size (or average size) of the observed time windows.

t

a numeric value indicating the size of the future time window.

alpha

a numeric value associated to the credible probability. By default alpha = 0.05, thus an prediction interval at 95% will be returned.

Details

The resulting limits are equivalent to those provided when running the function poisBayes() with arguments a = 0 and b = Inf.

Value

A list containing the following components:

lower

An integer value representing the lower bound of the prediction limit.

upper

An integer value representing the upper bound of the prediction limit.

Author(s)

Valbona Bejleri, Luca Sartore and Balgobin Nandram

References

Bejleri, V., & Nandram, B. (2018). Bayesian and frequentist prediction limits for the Poisson distribution. Communications in Statistics-Theory and Methods, 47(17), 4254-4271.

Bejleri, V. (2005). Bayesian Prediction Intervals for the Poisson Model, Noninformative Priors, Ph.D. Dissertation, American University, Washington, DC.

See Also

poiss, poisBayes, poisUNIF

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# 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)
) 

## Bayesian prediction limits 
##  (with Jeffreys prior)
poisJEFF(sum(data$occ_obs), # Past occurrencies 
    nrow(data), # Total past time windows
    mean(data$win_siz), # Window size
    444) # Size of future window

plpoisson documentation built on Feb. 15, 2021, 1:08 a.m.