normal_pi {predint} | R Documentation |
Simple uncalibrated prediction intervals for normal distributed data
Description
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.
Usage
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"
|
futmat_list |
used to add the list of future design matrices to the output
if called via |
futvec |
used to add the vector of the historical row numbers that define
the future experimental design to the output if called via |
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 as given in Menssen and Schaarschmidt 2022
with as the expected future observation (historical mean) and
as the
variance components and
as the residual variance and
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.
Value
normal_pi()
returns an object of class c("predint", "normalPI")
with prediction intervals or limits in the first entry ($prediction
).
References
Menssen and Schaarschmidt (2022): Prediction intervals for all of M future observations based on linear random effects models. Statistica Neerlandica, doi:10.1111/stan.12260
Examples
# simple PI
norm_pred <- normal_pi(mu=10, pred_se=3, m=1)
summary(norm_pred)