specify_bsvar: R6 Class representing the specification of the homoskedastic...

specify_bsvarR Documentation

R6 Class representing the specification of the homoskedastic BSVAR model

Description

The class BSVAR presents complete specification for the homoskedastic bsvar model.

Public fields

p

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

identification

an object IdentificationBSVAR with the identifying restrictions.

prior

an object PriorBSVAR with the prior specification.

data_matrices

an object DataMatricesBSVAR with the data matrices.

starting_values

an object StartingValuesBSVAR with the starting values.

Methods

Public methods


BSVAR$new()

Create a new specification of the homoskedastic bsvar model BSVAR.

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

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

p

a positive integer providing model's autoregressive lag order.

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.

Returns

A new complete specification for the homoskedastic bsvar model BSVAR.


BSVAR$get_normal()

Returns the logical value of whether the conditional shock distribution is normal.

Usage
BSVAR$get_normal()
Examples
spec = specify_bsvar$new(us_fiscal_lsuw)
spec$get_normal()

BSVAR$get_data_matrices()

Returns the data matrices as the DataMatricesBSVAR object.

Usage
BSVAR$get_data_matrices()
Examples
data(us_fiscal_lsuw)
spec = specify_bsvar$new(
   data = us_fiscal_lsuw,
   p = 4
)
spec$get_data_matrices()

BSVAR$get_identification()

Returns the identifying restrictions as the IdentificationBSVARs object.

Usage
BSVAR$get_identification()
Examples
data(us_fiscal_lsuw)
spec = specify_bsvar$new(
   data = us_fiscal_lsuw,
   p = 4
)
spec$get_identification()

BSVAR$get_prior()

Returns the prior specification as the PriorBSVAR object.

Usage
BSVAR$get_prior()
Examples
data(us_fiscal_lsuw)
spec = specify_bsvar$new(
   data = us_fiscal_lsuw,
   p = 4
)
spec$get_prior()

BSVAR$get_starting_values()

Returns the starting values as the StartingValuesBSVAR object.

Usage
BSVAR$get_starting_values()
Examples
data(us_fiscal_lsuw)
spec = specify_bsvar$new(
   data = us_fiscal_lsuw,
   p = 4
)
spec$get_starting_values()

BSVAR$clone()

The objects of this class are cloneable with this method.

Usage
BSVAR$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

estimate, specify_posterior_bsvar

Examples

data(us_fiscal_lsuw)
spec = specify_bsvar$new(
   data = us_fiscal_lsuw,
   p = 4
)


## ------------------------------------------------
## Method `BSVAR$get_normal()`
## ------------------------------------------------

spec = specify_bsvar$new(us_fiscal_lsuw)
spec$get_normal()


## ------------------------------------------------
## Method `BSVAR$get_data_matrices()`
## ------------------------------------------------

data(us_fiscal_lsuw)
spec = specify_bsvar$new(
   data = us_fiscal_lsuw,
   p = 4
)
spec$get_data_matrices()


## ------------------------------------------------
## Method `BSVAR$get_identification()`
## ------------------------------------------------

data(us_fiscal_lsuw)
spec = specify_bsvar$new(
   data = us_fiscal_lsuw,
   p = 4
)
spec$get_identification()


## ------------------------------------------------
## Method `BSVAR$get_prior()`
## ------------------------------------------------

data(us_fiscal_lsuw)
spec = specify_bsvar$new(
   data = us_fiscal_lsuw,
   p = 4
)
spec$get_prior()


## ------------------------------------------------
## Method `BSVAR$get_starting_values()`
## ------------------------------------------------

data(us_fiscal_lsuw)
spec = specify_bsvar$new(
   data = us_fiscal_lsuw,
   p = 4
)
spec$get_starting_values()


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