View source: R/envelope.forecast.R
envelope.forecast | R Documentation |
Envelope Functional Time Series Forecasting
envelope.forecast(data, focal, h, distance, typePoint, theta = 1)
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. |
a matrix containing the point forecast.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.