qp_pi()
is a helper function that is internally called by quasi_pois_pi()
. It
calculates simple uncalibrated prediction intervals for Poisson
data with constant overdispersion (quasi-Poisson assumption).
qp_pi(
newoffset,
histoffset,
lambda,
phi,
q = qnorm(1 - 0.05/2),
alternative = "both",
newdat = NULL,
histdat = NULL,
algorithm = NULL
)
qp_pi
returns an object of class c("predint", "quasiPoissonPI")
.
number of experimental units in the future clusters
number of experimental units in the historical clusters
overall Poisson mean
dispersion parameter
quantile used for interval calculation
either "both", "upper" or "lower"
alternative
specifies, if a prediction interval or
an upper or a lower prediction limit should be computed
additional argument to specify the current data set
additional argument to specify the historical data set
used to define the algorithm for calibration if called via
quasi_pois_pi()
. This argument is not of interest for the calculation
of simple uncalibrated intervals
This function returns a simple uncalibrated prediction interval
with
The direct application of this uncalibrated prediction interval to real life data
is not recommended. Please use the quasi_pois_pi_pi()
functions for real life applications.
# Prediction interval
qp_pred <- qp_pi(newoffset=3, lambda=3, phi=3, histoffset=1:9, q=qnorm(1-0.05/2))
summary(qp_pred)
Run the code above in your browser using DataLab