Learn R Programming

APRScenario (version 0.0.3.0)

full_scenarios_core: Exported version of full_scenarios_core

Description

This function wraps the Rcpp-exported version of full_scenarios_core and allows external users to call it with correct argument checks.

Usage

full_scenarios_core(
  big_b,
  big_M,
  obs,
  path,
  shocks,
  h,
  n_var,
  g_ = NULL,
  Sigma_g_ = NULL
)

Value

A list with elements depending on the input configuration. Typically includes:

mu_eps

Matrix of mean structural shocks

Sigma_eps

Covariance matrix of structural shocks

mu_y

Matrix of conditional means of observables

Sigma_y

Covariance matrix of observables

big_b

Slice of B matrices used

big_M

Slice of M matrices used

draws_used

Indices of posterior draws used in the simulation

Arguments

big_b

Cube of B matrices

big_M

Cube of M matrices

obs

Indices of constrained observables

path

Flattened path for observables

shocks

Indices of shocks to be recovered

h

Forecast horizon

n_var

Number of variables

g_

Optional vector of non-driving shocks

Sigma_g_

Optional covariance matrix of non-driving shocks

Examples

Run this code
if (FALSE) {
# This function is typically called internally by scenarios()
# Example usage with simulated data:
big_b <- array(rnorm(9*4*10), dim = c(9, 4, 10))
big_M <- array(rnorm(9*9*10), dim = c(9, 9, 10))
result <- full_scenarios_core(big_b, big_M, obs = 1:2, 
                              path = c(1.0, 1.1), shocks = NA, 
                              h = 2, n_var = 3)
}

Run the code above in your browser using DataLab