Projection-based functional data model
projection_model.Rd
Model and forecast functional data using a Hyndman and Ullah projection-based model.
Usage
projection_model(
X,
TVE = 0.95,
model = c("ets", "arima"),
n.ahead = 0,
alpha = 0.05,
check.cp = TRUE,
frequency = 1,
...
)
Arguments
- X
A dfts object or data which can be automatically converted to that format. See
dfts()
.- TVE
Numeric in [0,1] for the total variance explained to select number of PCA components to use to model the data.
- model
String to indicate method to model components, either "ets" or "arima".
- n.ahead
Number of observations to forecast.
- alpha
Significance in [0,1] for intervals when forecasting.
- check.cp
Boolean which indicates if the errors should be checked for change points to change forecasts and plots.
- frequency
Numeric for seasonal frequency when component is made a ts object for the models.
- ...
Additional information to pass into pca, change (if
check.cp=TRUE
), and plot.
Value
List with the following elements:
fit: dfts object for fit.
forecast_plot: plot of the data with any forecasted values.
residuals: dfts object for residuals from the fit.
changes: vector of any changes when using
detect.cp
.component_models: modeled PCs from the data.
component_true: true data constucted via the PCs.
parameters: list with fit parameters like pcs, TVE, model, and n.ahead.
References
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
Examples
result <- projection_model(dfts(electricity$data[,50:100]),
n.ahead=1, TVE=0.1, check.cp=FALSE)