Performs dynamic updating of functional time series forecasts using various methods.

dynupdate(
  data,
  newdata = NULL,
  holdoutdata,
  method = c("ts", "block", "ols", "pls", "ridge"),
  fmethod = c("arima", "ar", "ets", "ets.na", "rwdrift", "rw"),
  pcdmethod = c("classical", "M", "rapca"),
  ngrid = max(1000, ncol(data$y)),
  order = 6,
  robust_lambda = 2.33,
  lambda = 0.01,
  value = FALSE,
  interval = FALSE,
  level = 80,
  pimethod = c("parametric", "nonparametric"),
  B = 1000
)

Arguments

data

A functional time series object of class fts.

newdata

New observations to incorporate in the forecast.

holdoutdata

Holdout data for validation.

method

Update method: "ts", "block", "ols", "pls", or "ridge".

fmethod

Forecasting method: "arima", "ar", "ets", "ets.na", "rwdrift", or "rw".

pcdmethod

Functional PCA method: "classical", "M", or "rapca".

ngrid

Number of grid points for smoothing (default: max(1000, ncol(data$y))).

order

Number of principal components (default: 6).

robust_lambda

Robustness parameter (default: 2.33).

lambda

Ridge regression parameter (default: 0.01).

value

Logical. If TRUE, return forecast values (default: FALSE).

interval

Logical. If TRUE, compute prediction intervals (default: FALSE).

level

Confidence level for prediction intervals (default: 80).

pimethod

Method for prediction intervals: "parametric" or "nonparametric".

B

Number of bootstrap replications (default: 1000).

Value

If value=TRUE, returns forecast values. Otherwise, returns a list with error measures:

errormse

Mean squared error

errormae

Mean absolute error

errormape

Mean absolute percentage error

See also

Examples

if (FALSE) { # \dontrun{
# Load example data
data(pm_10_GR)

# Perform dynamic update
result <- dynupdate(pm_10_GR, newdata = pm_10_GR$y[,1:10], 
                    holdoutdata = pm_10_GR$y[,11:12], method = "pls")
} # }