Model and forecast functional data using a Hyndman and Ullah projection-based model.
projection_model(
X,
TVE = 0.95,
forecast.model = c("ets", "arima"),
n.ahead = 0,
alpha = 0.05,
check.cp = TRUE,
sim.bounds = TRUE,
M = 1000,
transformation = NULL,
...
)
List with the following elements:
data: List with data information.
plots: List with various plots.
residuals: dfts object for residuals from the fit.
changes: vector of any changes when using detect.cp
.
parameters: List with fit parameters like pcs, TVE, model, and n.ahead.
A dfts object or data which can be automatically converted to that
format. See dfts()
.
Numeric in [0,1] for the total variance explained to select number of PCA components to use to model the data.
String to indicate method to model components, either "ets" or "arima".
Number of observations to forecast.
Significance in [0,1] for intervals when forecasting.
Boolean which indicates if the errors should be checked for change points to change forecasts and plots.
Boolean if the confidence bounds should be simulated or computed using the covariance.
Numeric for the number of iterations used to simulated confidence bounds when sim.bounds is TRUE.
Argument that specifies any transformations. Currently only NULL (no transformation) 'log' (logarithmic), and 'sqrt' (square root) are acceptable.
Additional information to pass into pca, change (if
check.cp=TRUE
), and plot.
Hyndman, R. J., & Shahid Ullah, M. (2007). Robust forecasting of mortality and fertility rates: A functional data approach. Computational Statistics & Data Analysis, 51(10), 4942-4956. https://doi.org/10.1016/j.csda.2006.07.028
result <- projection_model(dfts(electricity$data[, 50:100], season = 7),
n.ahead = 1, TVE = 0.1, check.cp = FALSE, sim.bounds = FALSE
)
Run the code above in your browser using DataLab