Learn R Programming

ftsa (version 4.7)

dynamic_FLR: Dynamic updates via functional linear regression

Description

A functional linear regression is used to address the problem of dynamic updating, when partial data in the most recent curve are observed.

Usage

dynamic_FLR(dat, newdata, holdoutdata, order_k_percent = 0.9, order_m_percent = 0.9, pcd_method = c("classical", "M"), robust_lambda = 2.33, bootrep = 100, pointfore, level = 80)

Arguments

dat
An object of class sfts.
newdata
A data vector of newly arrived observations.
holdoutdata
A data vector of holdout sample to evaluate point forecast accuracy.
order_k_percent
Select the number of components that explains at least 90 percent of the total variation.
order_m_percent
Select the number of components that explains at least 90 percent of the total variation.
pcd_method
Method to use for principal components decomposition. Possibilities are "M", "rapca" and "classical".
robust_lambda
Tuning parameter in the two-step robust functional principal component analysis, when pcdmethod = "M".
bootrep
Number of bootstrap samples.
pointfore
If pointfore = TRUE, point forecasts are produced.
level
Nominal coverage probability.

Value

update_forecast
Updated forecasts.
holdoutdata
Holdout sample.
err
Forecast errors.
order_k
Number of principal components in the first block of functions.
order_m
Number of principal components in the second block of functions.
update_comb
Bootstrapped forecasts for the dynamically updating time period.
update_comb_lb_ub
By taking corresponding quantiles, obtain lower and upper prediction bounds.
err_boot
Bootstrapped in-sample forecast error for the dynamically updating time period.

Details

This function is designed to dynamically update point and interval forecasts, when partial data in the most recent curve are observed.

References

J-M. Chiou (2012) "Dynamical functional prediction and classification with application to traffic flow prediction", Annals of Applied Statistics, 6(4), 1588-1614.

H. L. Shang (2015) "Forecasting Intraday S&P 500 Index Returns: A Functional Time Series Approach", Working paper, http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2647233.

See Also

dynupdate

Examples

Run this code
dynamic_FLR_point = dynamic_FLR(dat = ElNino$y[,1:56], newdata = ElNino$y[1:4,57], 
	holdoutdata = ElNino$y[5:12,57], pointfore = TRUE)

dynamic_FLR_interval = dynamic_FLR(dat = ElNino$y[,1:56], newdata = ElNino$y[1:4,57], 
	holdoutdata = ElNino$y[5:12,57], pointfore = FALSE)

Run the code above in your browser using DataLab