Perform bootstrap SSA forecasting of the series

Share:

Description

Perform bootstrap SSA forecasting of the one-dimensional series.

Usage

1
2
3
4
5
6
7
8
## S3 method for class '1d.ssa'
bforecast(x, groups, len = 1, R = 100, level = 0.95,
          type = c("recurrent", "vector"), ...,
          drop = TRUE, drop.attributes = FALSE, cache = TRUE)
## S3 method for class 'toeplitz.ssa'
bforecast(x, groups, len = 1, R = 100, level = 0.95,
          type = c("recurrent", "vector"), ...,
          drop = TRUE, drop.attributes = FALSE, cache = TRUE)

Arguments

x

SSA object holding the decomposition

groups

list, the grouping of eigentriples to be used in the forecast

len

the desired length of the forecasted series

R

number of bootstrap replications

level

vector of confidence levels for bounds

type

the type of forecast method to be used during bootstrapping

...

additional arguments passed to forecasting routines

drop

logical, if 'TRUE' then the result is coerced to series itself, when possible (length of 'groups' is one)

drop.attributes

logical, if 'TRUE' then the attributes of the input series are not copied to the reconstructed ones

cache

logical, if 'TRUE' then intermediate results will be cached in the SSA object

Details

The routine uses the reconstruction residuals in order to calculate their empirical distribution (the residuals are assumed to be stationary). Empirical distribution of the residuals is used to perform bootstrap series simulation. Such bootsrapped series are then extended via selected forecast method. Finally, the distribution of forecasted values is used to calculate bootstrap estimate of series forecast and confidence bounds.

Value

List of matricies. Each matrix has 1 + 2*length(level) columns and 'len' rows. First column contains the forecasted values, remaining columns — low and upper bootstrap confidence bounds for average forecasted values.

The matrix itself, if length of groups is one and 'drop = TRUE'.

See Also

Rssa for an overview of the package, as well as, rforecast, vforecast, forecast.

Examples

1
2
3
4
5
6
7
# Decompose 'co2' series with default parameters
s <- ssa(co2)
# Produce 24 forecasted values and confidence bounds of the series using
# the first 3 eigentriples as a base space for the forecast.

f <- bforecast(s, groups = list(1:3), len = 24, R = 50)
matplot(f, col = c("black", "red", "red"), type='l')

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.