envelope.forecast: Envelope Functional Time Series Forecasting

View source: R/envelope.forecast.R

envelope.forecastR Documentation

Envelope Functional Time Series Forecasting

Description

Envelope Functional Time Series Forecasting

Usage

envelope.forecast(data, focal, h, distance, typePoint, theta = 1)

Arguments

data

matrix PXN being N the total number of functions and P the total number of observed values for each function. The columns are ordered by time from 0 to T.

focal

the name of the curve to envelope. In the article, the most recent curve.

h

forecasting horizon.

distance

vector of distances $D(i,N)$, i.e. distance between the last observed curve and the others.

typePoint

type of point estimate: "w" for weighted mean and "expw" for exponentially weighted mean.

theta

parameter for the "expw" point type. The default value is 1.

Value

a matrix containing the point forecast.

Examples


# One-period-ahead
data(electricityDemand)
focal <- "saturday/29/12/2018"
data <- rainbow::fts(electricityDemand$x, electricityDemand$y[,1:1825])
point <- envelope.forecast(data, focal, h = 1, distance = "l2", typePoint = "expw", theta = 1)

# DU half day
focal <- "monday/31/12/2018"
data <- electricityDemand
data$y[72:144, focal] <- NA
point <- envelope.forecast(data, focal, h = 1, distance = "l2", typePoint = "expw", theta = 1)


aefdz/nnFTS documentation built on March 17, 2023, 3:22 a.m.