HVAR.old: Estimation of a HVAR(p)

Description Usage Arguments Details Value

Description

Estimation of a HVAR using a clustered and diagonalised regressor matrix.

Usage

1
2
3
4
5
HVAR.old(y, p = 1, type = c("const", "trend", "both", "none"),
  det = c("before", "after", "during"), season = NULL, exogen = NULL,
  clust.method = c("AGNES", "DIANA", "OPT"), clust.control = NULL,
  distance.lambda = 0, max.splits = 1, min.cluster = 1,
  p.value = 1)

Arguments

y

Data item containing the endogenous variables

p

Integer for the lag order (default is p=1)

type

Type of deterministic regressors to include

det

Should deterministic items be partialled out before, after or during coefficient estimation

season

Inclusion of centered seasonal dummy variables (integer value of frequency)

exogen

Inclusion of exogenous variables

clust.method

Hierarchical clustering algorithm used to diagonalise the regressor correlation matrix

clust.control

Optional arguments to pass to clust.method

distance.lambda

Splitting threshold (must be within the range 0-1). See details for more information

max.splits

Maximum number of splits to place at each hierarchical level

min.cluster

Minimum number of items at each final node of the hierarchy

p.value

Prune hierarchical tree by ignoring branches with an insignificant parent coefficient (specify significance level)

Details

This function implements a VAR model, where the parameter space is restricted along a hierarchical structure.

The parameter 'clust.method' sets the cluster algorithm used to determine the hierarchical cluster. AGNES and DIANA implement the Agglomerative Nesting and Divisive Analysis algorithms of the 'cluster' package, while OPT using the package 'gaoptim' to optimise quasi-diagonality the regressor correlation matrix using the genetic permutation method 'GAPerm'.

'clust.control' allows additional arguments to be passed to the cluster method. Currently, only 2 are implemented: the AGNES method (default is single-linkage) and the maximum iterations (niter) for the genetic optimiser.

The 'distance.lambda'controls the location where the cluster tree may be split into new branches. distance.lambda=1 searches for the optimal splitting location, while distance.lambda=0 permits any location. If max.splits>=ncol(x), where x is the regressor matrix, and distance.lambda=0, a normal VAR model is estimated.

'max.splits' controls the maximum splits to place at each level (default is 1). If there are more qualifying splits than max.splits, then the function prioritises tree symmetry.

Value

A 'varest' object (see package 'vars'). This can be used with methods such as 'Bcoef', 'predict', 'fevd', etc. from the 'vars'-package. Note that this is not a perfect solution. For instance, bootstrapping irf intervals will not work and the 'lm' objects contained in 'object$varest' are not native. The purpose is to enable the user to process results, but native functions will be added in future.


jpfitzinger/HierarchicalVAR documentation built on May 9, 2019, 5:06 a.m.