nb_bvar: Notebook generator: BVAR NiW

Description Usage Arguments Details

View source: R/macro_nb_generators.R

Description

Generates a notebook for a BVAR model with a Minnesota-flavoured NiW prior..

Usage

1
2
3
4
5
6
7
8
nb_bvar(
  data = oscbvar::macrodata[, 1:7],
  agc = list(5, 60, TRUE, 1),
  lags = 1,
  overall_tightness = 0.2,
  lag_decay = 1,
  include_intercept = TRUE
)

Arguments

data

Dataset from which to generate the notebook. Should include only the variables used by the model. Defaults to the macroeconomic dataset from this package using all varaibles.

agc

List of atomic prediction generation controllers. The first element of the list gives the starting time (ie what observation is considered as t = 1), the second element is the minimum window length used for estimation, and the third one is a boolean indicating if the estimation window is rolling or not, the forth indicates which variable is the response variable and it defaults to 1.

lags

The order of the VAR model. Defaults to 1.

overall_tightness

Overall tightness (pi_1 in Sunes notation). Defaults to 0.2

lag_decay

The lag decay rate. Defaults to 1.

include_intercept

Whether or not to include an intercept. Defaults to TRUE.

Details

Generates a notebook of predictions for the decision maker to use. Uses a version of the Minnesota prior: the prior for the variance is data based with nu_0 set to the number of time series plus two, and S_0 obtained by running a simple AR(4) model and extracting the diagonal elements. The prior for the regression coefficients is tweaked using two hyperparameters: the overall tightness (defaults to 0.2) and the lag decay rate (defaults to 1). The cross-variable tightness is set to 1 to retain the Kronecker structure required for conjugacy.


ooelrich/oscbvar documentation built on Sept. 8, 2021, 3:31 p.m.