forc_h: forc_h function

View source: R/forc_h.r

forc_hR Documentation

forc_h function

Description

forc_h function

Usage

forc_h(
  h = 1,
  n_sim = 200,
  data_ = NULL,
  posterior = NULL,
  matrices = NULL,
  max_cores = 1
)

Arguments

h

forecast horizon

n_sim

length of shock simulation

data_

Optional matrix of data n_var*h+1 x T. If NULL, defaults to matrices$Z

posterior

Optional posterior object (default taken from calling environment)

matrices

Optional matrices object from gen_mats() (default taken from calling environment)

max_cores

maximum number of cores to use for parallel processing (default: 1 for Windows compatibility)

Value

a matrix of unconditional forecasts

Examples

## Not run: 
# Example usage for unconditional forecasting
forecast <- forc_h(h = 4, n_sim = 1000, 
                   posterior = posterior, matrices = matrices)

## End(Not run)

APRScenario documentation built on Dec. 22, 2025, 1:06 a.m.