model_est_single: Direct Autoregressive Forecast Model

model_est_singleR Documentation

Direct Autoregressive Forecast Model

Description

Estimates a direct autoregressive forecast model.

Usage

model_est_single(y, h, lags)

Arguments

y

A vector or a time series.

h

An integer, the horizon from which y is being forecasted.

lags

A data frame with lags to begin and to stop. These lags can be indirectly obtaneid by the function lags as example below shows.

Details

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.

Value

A list of the following components:

model

A lm object.

n_obs

Number of observations.

h

The horizon.

See Also

model_est model_fcast

Examples

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)

nelson16silva/wavcoreinf documentation built on Feb. 17, 2025, 7:10 p.m.