ts_info | R Documentation |
The information about the time series is compounded of the time series and, optionally, its future values and forecasts for those future values (and prediction intervals for those forecasts).
ts_info(historical, ..., future = NULL, name = NULL)
historical |
a time series of class |
... |
forecasts for the future values of the time series. A forecast
must have been built with the |
future |
NULL (default) or a time series of class |
name |
NULL (default) or a character string with information about the time series. Typically, its name. |
An object of class ts_info
. It is a list containing all the
information supplied to the function.
prediction_info()
for how to create forecasts.
# only information about a time series
info <- ts_info(USAccDeaths)
# Information about a time series and its future values
info2 <- ts_info(ts(rnorm(50)), future = rnorm(10))
# Information about a time series, its future values and a forecast
if (require("forecast")) {
t <- ts(rnorm(50))
f <- rnorm(10)
mf <- meanf(t, level = 95)
info3 <- ts_info(t, future = f,
prediction_info("mean", mf$mean,
pi_info(95, mf$lower, mf$upper)
)
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.