ts_info {vctsfr}R Documentation

Create an object with information about a time series

Description

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).

Usage

ts_info(historical, ..., future = NULL, name = NULL)

Arguments

historical

a time series of class ts with the historical values of the series.

...

forecasts for the future values of the time series. A forecast must have been built with the prediction_info() function. See the examples section.

future

NULL (default) or a time series of class ts or a vector. The future values of the time series (possibly to be forecast).

name

NULL (default) or a character string with information about the time series. Typically, its name.

Value

An object of class ts_info. It is a list containing all the information supplied to the function.

See Also

prediction_info() for how to create forecasts.

Examples

# 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)
                   )
  )
}

[Package vctsfr version 0.1.1 Index]