model_est_single | R Documentation |
Estimates a direct autoregressive forecast model.
model_est_single(y, h, lags)
y |
A vector or a time series. |
h |
An integer, the horizon from which |
lags |
A data frame with lags to begin and to stop. These
lags can be indirectly obtaneid by the function |
Condiser the following regression:
y_{i,t+h} = a_0 + y_{i,t + 1 - pstart} + ... + y_{i,t + 1 - pend} + e_{i,t + h}
.
model_est_single
estimates the above regression for all indexes in the
data frame lags
(p_start
\ge 1
).
Details section for the function model_est
provides
more information. Forecasting obtainded by the direct autoregressive model
can be compared with forecasting where lags of the core inflation
measure are considered in the model as in model_est
function.
A list of the following components:
model |
A lm object. |
n_obs |
Number of observations. |
h |
The horizon. |
model_est
model_fcast
x <- arima.sim(n = 30, list(ar = c(0.8897, -0.4858)))
p <- unique(lags(2, 1)[, 1:2])
model_est_single(x, 2, p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.