Fits a functional time series model using functional principal component analysis.

ftsm(
  y,
  order = 6,
  ngrid = max(500, ncol(y$y)),
  method = c("classical", "M", "rapca"),
  mean = TRUE,
  level = FALSE,
  lambda = 3,
  weight = FALSE,
  beta = 0.1,
  ...
)

Arguments

y

A functional time series object of class fts.

order

Number of principal components to include in the model (default: 6).

ngrid

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

method

Method for functional principal component analysis: "classical" (default), "M", or "rapca".

mean

Logical. If TRUE, include mean function in the model (default: TRUE).

level

Logical. If TRUE, include level component in the model (default: FALSE).

lambda

Smoothing parameter for penalized splines (default: 3).

weight

Logical. If TRUE, use weighted functional principal component analysis (default: FALSE).

beta

Weight parameter for exponential weighting (default: 0.1).

...

Additional arguments passed to the functional PCA function.

Value

An object of class ftsm containing:

x1

Time points

y1

Grid points

y

Original functional time series

basis

Basis functions (eigenfunctions)

coeff

Coefficients (scores)

fitted

Fitted values

residuals

Residuals

varprop

Proportion of variance explained by each component

eigen_values

Eigenvalues

wt

Weights

v

Eigenvalues

basis2

Second set of basis functions

coeff2

Second set of coefficients

mean.se

Standard error of the mean function

call

Function call

References

Hyndman, R.J., & Shang, H.L. (2009). Forecasting functional time series. Journal of the Korean Statistical Society, 38(3), 199-221.

See also

Examples

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

# Fit functional time series model
fit <- ftsm(pm_10_GR, order = 3)

# Plot the model
plot(fit)

# Forecast
forecast(fit, h = 12)
} # }