specify_bsvar_mix: R6 Class representing the specification of the BSVAR model...

specify_bsvar_mixR Documentation

R6 Class representing the specification of the BSVAR model with a zero-mean mixture of normals model for structural shocks.

Description

The class BSVARMIX presents complete specification for the BSVAR model with a zero-mean mixture of normals model for structural shocks.

Super class

BSVARMSH -> BSVARMIX

Public fields

p

a non-negative integer specifying the autoregressive lag order of the model.

identification

an object IdentificationBSVARs with the identifying restrictions.

prior

an object PriorBSVARMIX with the prior specification.

data_matrices

an object DataMatricesBSVAR with the data matrices.

starting_values

an object StartingValuesBSVARMIX with the starting values.

finiteM

a logical value - if true a finite mixture model is estimated. Otherwise, a sparse mixture model is estimated in which M=20 and the number of visited states is estimated.

Methods

Public methods

Inherited methods
  • BSVARMSH$get_data_matrices()
  • BSVARMSH$get_identification()
  • BSVARMSH$get_normal()
  • BSVARMSH$get_prior()
  • BSVARMSH$get_starting_values()

BSVARMIX$new()

Create a new specification of the BSVAR model with a zero-mean mixture of normals model for structural shocks, BSVARMIX.

Usage
BSVARMIX$new(
  data,
  p = 1L,
  M = 2L,
  B,
  A,
  distribution = c("norm", "t"),
  exogenous = NULL,
  stationary = rep(FALSE, ncol(data)),
  finiteM = TRUE
)
Arguments
data

a (T+p)xN matrix with time series data.

p

a positive integer providing model's autoregressive lag order.

M

an integer greater than 1 - the number of components of the mixture of normals.

B

a logical NxN matrix containing value TRUE for the elements of the structural matrix B to be estimated and value FALSE for exclusion restrictions to be set to zero.

A

a logical NxK matrix containing value TRUE for the elements of the autoregressive matrix A to be estimated and value FALSE for exclusion restrictions to be set to zero.

distribution

a character string specifying the conditional distribution of structural shocks. Value "norm" sets it to the normal distribution, while value "t" sets the Student-t distribution.

exogenous

a (T+p)xd matrix of exogenous variables.

stationary

an N logical vector - its element set to FALSE sets the prior mean for the autoregressive parameters of the Nth equation to the random walk process, otherwise to white noise.

finiteM

a logical value - if true a finite mixture model is estimated. Otherwise, a sparse mixture model is estimated in which M=20 and the number of visited states is estimated.

Returns

A new complete specification for the bsvar model with a zero-mean mixture of normals model for structural shocks, BSVARMIX.


BSVARMIX$clone()

The objects of this class are cloneable with this method.

Usage
BSVARMIX$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

estimate, specify_posterior_bsvar_mix

Examples

data(us_fiscal_lsuw)
spec = specify_bsvar_mix$new(
   data = us_fiscal_lsuw,
   p = 4,
   M = 2
)


bsvars documentation built on Aug. 22, 2026, 5:09 p.m.