| qp_pi {predint} | R Documentation | 
Simple uncalibrated prediction intervals for quasi-Poisson data
Description
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).
Usage
qp_pi(
  newoffset,
  histoffset,
  lambda,
  phi,
  q = qnorm(1 - 0.05/2),
  alternative = "both",
  newdat = NULL,
  histdat = NULL,
  algorithm = NULL
)
Arguments
| newoffset | number of experimental units in the future clusters | 
| histoffset | number of experimental units in the historical clusters | 
| lambda | overall Poisson mean | 
| phi | dispersion parameter | 
| q | quantile used for interval calculation | 
| alternative | either "both", "upper" or "lower"
 | 
| newdat | additional argument to specify the current data set | 
| histdat | additional argument to specify the historical data set | 
| algorithm | used to define the algorithm for calibration if called via
 | 
Details
This function returns a simple uncalibrated prediction interval
[l,u]_m = n^*_m \hat{\lambda} \pm q \sqrt{n^*_m \hat{\phi} \hat{\lambda} +
 \frac{n^{*2}_m \hat{\phi} \hat{\lambda}}{\sum_h n_h}}
with n^*_m as the number of experimental units in the m=1, 2, ... , M future clusters,
\hat{\lambda} as the estimate for the Poisson mean obtained from the
historical data, \hat{\phi} as the estimate for the dispersion parameter
and n_h as the number of experimental units per historical cluster. 
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.
Value
qp_pi returns an object of class c("predint", "quasiPoissonPI").
Examples
# Prediction interval
qp_pred <- qp_pi(newoffset=3, lambda=3, phi=3, histoffset=1:9, q=qnorm(1-0.05/2))
summary(qp_pred)