Simple uncalibrated prediction intervals for normal distributed data
Simple uncalibrated prediction intervals for normal distributed data
normal_pi() is a helper function that is internally called by the lmer_pi_...() functions. It calculates simple uncalibrated prediction intervals for normal distributed observations.
normal_pi( mu, pred_se, m =1, q = qnorm(1-0.05/2), alternative ="both", futmat_list =NULL, futvec =NULL, newdat =NULL, histdat =NULL, algorithm =NULL)
Arguments
mu: overall mean
pred_se: standard error of the prediction
m: number of future observations
q: quantile used for interval calculation
alternative: either "both", "upper" or "lower" alternative specifies, if a prediction interval or an upper or a lower prediction limit should be computed
futmat_list: used to add the list of future design matrices to the output if called via lmer_pi_futmat()
futvec: used to add the vector of the historical row numbers that define the future experimental design to the output if called via lmer_pi_futmat()
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 lmer_pi_...(). This argument is not of interest for the calculation of simple uncalibrated intervals
Returns
normal_pi() returns an object of class c("predint", "normalPI")
with prediction intervals or limits in the first entry ($prediction).
Details
This function returns a simple uncalibrated prediction interval as given in Menssen and Schaarschmidt 2022
[l,u]=μ^±qvar(μ^)+c=1∑C+1σ^c2
with μ^ as the expected future observation (historical mean) and σ^c2 as the c=1,2,...,C variance components and σ^C+12
as the residual variance and q as the quantile used for interval calculation.
The direct application of this uncalibrated prediction interval to real life data is not recommended. Please use the lmer_pi_...() functions for real life applications.
Menssen and Schaarschmidt (2022): Prediction intervals for all of M future observations based on linear random effects models. Statistica Neerlandica, tools:::Rd_expr_doi("10.1111/stan.12260")