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,
forecast.model = c("ets", "arima"),
n.ahead = 0,
alpha = 0.05,
check.cp = TRUE,
sim.bounds = TRUE,
M = 1000,
transformation = NULL,
...
)
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.
- forecast.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.
- sim.bounds
Boolean if the confidence bounds should be simulated or computed using the covariance.
- M
Numeric for the number of iterations used to simulated confidence bounds when sim.bounds is TRUE.
- transformation
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.
Value
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.
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], season=7),
n.ahead=1, TVE=0.1, check.cp=FALSE, sim.bounds=FALSE)