multicov | R Documentation |
This function extracts covariance matrix of 1 to h steps ahead forecast errors for
ssarima()
, gum()
, sma()
, es()
and ces()
models.
multicov(object, type = c("analytical", "empirical", "simulated"), h = 10,
nsim = 1000, ...)
## S3 method for class 'smooth'
multicov(object, type = c("analytical", "empirical",
"simulated"), h = 10, nsim = 1000, ...)
object |
Model estimated using one of the functions of smooth package. |
type |
What method to use in order to produce covariance matrix:
|
h |
Forecast horizon to use in the calculations. |
nsim |
Number of iterations to produce in the simulation. Only needed if
|
... |
Other parameters passed to simulate function (if |
The function returns either scalar (if it is a non-smooth model) or the matrix of (h x h) size with variances and covariances of 1 to h steps ahead forecast errors. This is currently done based on empirical values. The analytical ones are more complicated.
Scalar in cases of non-smooth functions. (h x h) matrix otherwise.
Ivan Svetunkov, ivan@svetunkov.ru
orders
x <- rnorm(100,0,1)
# A simple example with a 5x5 covariance matrix
ourModel <- ces(x, h=5)
multicov(ourModel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.