Skip to contents

The class BSVARSV presents complete specification for the BSVAR model with Stochastic Volatility heteroskedasticity.

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 PriorBSVARSV with the prior specification.

data_matrices

an object DataMatricesBSVAR with the data matrices.

starting_values

an object StartingValuesBSVARSV with the starting values.

centred_sv

a logical value - if true a centred parameterisation of the Stochastic Volatility process is estimated. Otherwise, its non-centred parameterisation is estimated. See Lütkepohl, Shang, Uzeda, Woźniak (2022) for more info.

Methods


Method new()

Create a new specification of the BSVAR model with Stochastic Volatility heteroskedasticity, BSVARSV.

Usage

specify_bsvar_sv$new(
  data,
  p = 1L,
  B,
  exogenous = NULL,
  centred_sv = FALSE,
  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.

exogenous

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

centred_sv

a logical value. If FALSE a non-centred Stochastic Volatility processes for conditional variances are estimated. Otherwise, a centred process is estimated.

stationary

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

Returns

A new complete specification for the bsvar model with Stochastic Volatility heteroskedasticity, BSVARSV.


Method get_data_matrices()

Returns the data matrices as the DataMatricesBSVAR object.

Usage

specify_bsvar_sv$get_data_matrices()

Examples

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


Method get_identification()

Returns the identifying restrictions as the IdentificationBSVARs object.

Usage

specify_bsvar_sv$get_identification()

Examples

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


Method get_prior()

Returns the prior specification as the PriorBSVARSV object.

Usage

specify_bsvar_sv$get_prior()

Examples

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


Method get_starting_values()

Returns the starting values as the StartingValuesBSVARSV object.

Usage

specify_bsvar_sv$get_starting_values()

Examples

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


Method clone()

The objects of this class are cloneable with this method.

Usage

specify_bsvar_sv$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

data(us_fiscal_lsuw)
spec = specify_bsvar_sv$new(
   data = us_fiscal_lsuw,
   p = 4
)
#> The identification is set to the default option of lower-triangular structural matrix.


## ------------------------------------------------
## Method `specify_bsvar_sv$get_data_matrices`
## ------------------------------------------------

data(us_fiscal_lsuw)
spec = specify_bsvar_sv$new(
   data = us_fiscal_lsuw,
   p = 4
)
#> The identification is set to the default option of lower-triangular structural matrix.
spec$get_data_matrices()
#> <DataMatricesBSVAR>
#>   Public:
#>     X: -10.6660327703266 -10.6935259109068 -8.41420587851191 -1 ...
#>     Y: -10.6725356416822 -10.6388624265757 -8.42993325328991 -1 ...
#>     clone: function (deep = FALSE) 
#>     get_data_matrices: function () 
#>     initialize: function (data, p = 1L, exogenous = NULL) 


## ------------------------------------------------
## Method `specify_bsvar_sv$get_identification`
## ------------------------------------------------

data(us_fiscal_lsuw)
spec = specify_bsvar_sv$new(
   data = us_fiscal_lsuw,
   p = 4
)
#> The identification is set to the default option of lower-triangular structural matrix.
spec$get_identification()
#> <IdentificationBSVARs>
#>   Public:
#>     VB: list
#>     clone: function (deep = FALSE) 
#>     get_identification: function () 
#>     initialize: function (N, B) 
#>     set_identification: function (N, B) 


## ------------------------------------------------
## Method `specify_bsvar_sv$get_prior`
## ------------------------------------------------

data(us_fiscal_lsuw)
spec = specify_bsvar_sv$new(
   data = us_fiscal_lsuw,
   p = 4
)
#> The identification is set to the default option of lower-triangular structural matrix.
spec$get_prior()
#> <PriorBSVARSV>
#>   Inherits from: <PriorBSVAR>
#>   Public:
#>     A: 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  ...
#>     A_V_inv: 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0  ...
#>     B_V_inv: 1 0 0 0 1 0 0 0 1
#>     B_nu: 3
#>     clone: function (deep = FALSE) 
#>     get_prior: function () 
#>     hyper_a_A: 10
#>     hyper_a_B: 10
#>     hyper_nu_A: 10
#>     hyper_nu_AA: 10
#>     hyper_nu_B: 10
#>     hyper_nu_BB: 1
#>     hyper_s_AA: 10
#>     hyper_s_BB: 100
#>     initialize: function (N, p, d = 0, stationary = rep(FALSE, N)) 
#>     sv_a_: 1
#>     sv_s_: 0.1


## ------------------------------------------------
## Method `specify_bsvar_sv$get_starting_values`
## ------------------------------------------------

data(us_fiscal_lsuw)
spec = specify_bsvar_sv$new(
   data = us_fiscal_lsuw,
   p = 4
)
#> The identification is set to the default option of lower-triangular structural matrix.
spec$get_starting_values()
#> <StartingValuesBSVARSV>
#>   Inherits from: <StartingValuesBSVAR>
#>   Public:
#>     A: 0.570856113685295 0 0 0 0.087203640723601 0 0 0 0.712422 ...
#>     B: 1 0 0 0 1 0 0 0 1
#>     S: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  ...
#>     clone: function (deep = FALSE) 
#>     get_starting_values: function () 
#>     h: -0.0177547949862742 -0.00371344960343545 0.0277125364817 ...
#>     hyper: 10 10 10 10 10 10 10 10 10 10 10 10 10 10
#>     initialize: function (N, p, T, d = 0) 
#>     omega: 0.1 0.1 0.1
#>     rho: 0.5 0.5 0.5
#>     s_: 0.05 0.05 0.05
#>     set_starting_values: function (last_draw) 
#>     sigma2_omega: 1 1 1
#>     sigma2v: 0.01 0.01 0.01