| Title: | Computation of Adaptive Forecast |
|---|---|
| Description: | The function forAD() implements the adaptive forecasting procedure of Giraitis, Kapetanios and Price (2013) <doi:10.1016/j.jeconom.2013.04.003>. The method can be iterated (e.g., adapt²) and combined with autoregressive (AR) forecasting. These approaches are computationally simple and adapt automatically to structural changes without requiring prior specification of the underlying data-generating process. They are applicable to both stationary and non-stationary time series. The numerical and graphical outputs assist in selecting an appropriate forecasting method, particularly one that minimises mean squared forecast error (MSFE) and yields uncorrelated forecast errors. |
| Authors: | Violetta Dalla [aut, cre], Liudas Giraitis [aut], George Kapetanios [aut] |
| Maintainer: | Violetta Dalla <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-05-08 17:17:06 UTC |
| Source: | https://github.com/cran/forecastADAPT |
The functions forAD computes the adaptive one-step ahead forecast of Giraitis, Kapetanios and Price (2013).
forAD(x, p_max = 3, T0 = 50, n_v = 100, n_AR = 400, plots = TRUE, P = 50, PL = 500, p = 1, date_1 = NULL)forAD(x, p_max = 3, T0 = 50, n_v = 100, n_AR = 400, plots = TRUE, P = 50, PL = 500, p = 1, date_1 = NULL)
x |
A univariate numeric time series ( |
p_max |
Maximum order of the AR model. Default is |
T0 |
Length of the training period used to select tuning parameter |
n_v |
Length of the period of forecast errors used in calculation of MSFE. Default is |
n_AR |
Length of the period of forecast errors used for estimation of AR and for computing correlograms. Default is |
plots |
Logical. If |
P |
Length of the period used in plots. Default is |
PL |
Length of the longer period used in plots. Default is |
p |
Selected AR order used in plots. Default is |
date_1 |
The date for the one-step ahead forecast when |
The method implements the adaptive (one-stage adapt or two-stage adapt) one-step ahead forecasting with weights for (normalized to sum up to 1) in the 1st step, combined with AR forecasting in 2nd step.
An object of class 'forAD', which is a list with the following components:
for_1 |
The one-step ahead forecast for all methods (adapt, adapt+AR( |
rho |
The tuning parameter for adaptive methods (adapt, adapt |
ar_coef_se |
The estimated coefficients and their standard errors for the adapt+AR( |
ar_coef_se_sq |
The estimated coefficients and their standard errors for the adapt |
MSFE |
The MSFE for all methods. |
for_in |
The rolling one-step ahead forecasts for all methods. |
rho_in |
The rolling tuning parameters for adaptive methods. |
MSFE_in |
The rolling MSFE for all methods. |
err_in |
The rolling one-step ahead forecast errors for all methods. |
data |
The original data. |
Missing values are not allowed.
Permitted sample size: when p_max > 0 and when p_max = 0.
Violetta Dalla, Liudas Giraitis and George Kapetanios
Giraitis L, Kapetanios G, Price S (2013). "Adaptive Forecasting in the Presence of Recent and Ongoing Structural Change." Journal of Econometrics, 177(2), 153-170. doi:10.1016/j.jeconom.2013.04.003.
Giraitis L, Kapetanios G, Mansur M, Price S (2015). "Forecasting Under Structural Change." In J Beran, Y Feng, H Hebbel (eds.), Empirical Economic and Financial Research: Theory, Methods and Practice, pp. 401–419. Springer International Publishing, Cham. doi:10.1007/978-3-319-03122-4_25.
# Sample x contains 200 independent standard normal data. x <- rnorm(200) print(forAD(x, plots = FALSE)) # Set plots to TRUE to see the plots. print(forAD(x))# Sample x contains 200 independent standard normal data. x <- rnorm(200) print(forAD(x, plots = FALSE)) # Set plots to TRUE to see the plots. print(forAD(x))