oneStepAhead | R Documentation |
Computes successive one-step-ahead predictions from a model fit.
There is a method for hhh4
models from surveillance
(see the documentation of oneStepAhead
there)
and a derived method for ZI-extended models fitted from hhh4ZI
.
The documentation of the arguments is inherited from the former;
where "hhh4"
is mentioned, "hhh4ZI"
works interchangeably.
Predictions can be inspected using quantile
,
confint
and plot
methods.
oneStepAhead(result, tp, ...)
## S3 method for class 'hhh4'
oneStepAhead(
result,
tp,
type = c("rolling", "first", "final"),
which.start = c("current", "final"),
keep.estimates = FALSE,
verbose = type != "final",
cores = 1,
...
)
## S3 method for class 'hhh4ZI'
oneStepAhead(
result,
tp,
type = c("rolling", "first", "final"),
which.start = c("current", "final"),
keep.estimates = FALSE,
verbose = TRUE,
cores = 1,
...
)
## S3 method for class 'oneStepAhead_hhh4ZI'
quantile(x, probs = c(2.5, 10, 50, 90, 97.5)/100, ...)
## S3 method for class 'oneStepAhead_hhh4ZI'
confint(object, parm, level = 0.95, ...)
## S3 method for class 'oneStepAhead_hhh4ZI'
plot(x, unit = 1, probs = 1:99/100, start = NULL, ...)
result |
fitted |
tp |
numeric vector of length 2 specifying the time range in
which to compute one-step-ahead predictions (for the time points
|
... |
unused (argument of the generic). |
type |
The default |
which.start |
Which initial parameter values should be used when successively
refitting the model to subsets of the data (up to time point
|
keep.estimates |
logical indicating if parameter estimates and log-likelihoods from the successive fits should be returned. |
verbose |
non-negative integer (usually in the range |
cores |
the number of cores to use when computing
the predictions for the set of time points |
x |
an object of class |
probs |
numeric vector of probabilities with values in [0,1]. |
object |
an object of class |
parm |
unused (argument of the generic). |
level |
required confidence level of the prediction interval. |
unit |
single integer or character selecting a unit for which to produce the plot. |
start |
x-coordinate of the first prediction. If |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.