This function is deprecated. Please use lmer_pi_unstruc()
,
lmer_pi_futvec()
or lmer_pi_futmat()
.
lmer_pi(
model,
newdat = NULL,
m = NULL,
alternative = "both",
alpha = 0.05,
nboot = 10000,
lambda_min = 0.01,
lambda_max = 10,
traceplot = TRUE,
n_bisec = 30
)
If newdat
is specified: A data.frame
that contains the future data,
the historical mean (hist_mean), the calibrated coefficient (quant_calib),
the prediction standard error (pred_se), the prediction interval (lower and upper)
and a statement if the prediction interval covers the future observation (cover).
If m
is specified: A data.frame
that contains the number of future observations (m)
the historical mean (hist_mean), the calibrated coefficient (quant_calib),
the prediction standard error (pred_se) and the prediction interval (lower and upper).
If alternative
is set to "lower": Lower prediction limits are computed instead
of a prediction interval.
If alternative
is set to "upper": Upper prediction limits are computed instead
of a prediction interval.
If traceplot=TRUE
, a graphical overview about the bisection process is given.
a random effects model of class "lmerMod"
a data.frame
with the same column names as the historical data
on which the model depends
number of future observations
either "both", "upper" or "lower". alternative
specifies
if a prediction interval or an upper or a lower prediction limit should be computed
defines the level of confidence (1-alpha
)
number of bootstraps
lower start value for bisection
upper start value for bisection
if TRUE
: plot for visualization of the bisection process
maximal number of bisection steps
This function returns a bootstrap calibrated prediction interval
$$[l,u] = \hat{y} \pm q \sqrt{\hat{var}(\hat{y} - y)}$$
with \(\hat{y}\) as the predicted future observation,
\(y\) as the observed future observations, \(\sqrt{\hat{var}(\hat{y} - y)}\)
as the prediction standard error and \(q\) as the bootstrap calibrated coefficient that
approximates a quantile of the multivariate t-distribution.
Please note that this function relies on linear random effects models that are
fitted with lmer()
from the lme4 package. Random effects have to be specified as
(1|random_effect)
.
# This function is deprecated.
# Please use lmer_pi_unstruc() if you want exactly the same functionality.
# Please use lmer_pi_futmat() or lmer_pi_futvec() if you want to take care
# of the future experimental design
Run the code above in your browser using DataLab