ForecastGibbs: Update the design matrix with a forecasted data point.

Description Usage Arguments Details Value

View source: R/foref.R

Description

Given a model structure and a OneStep object to use as new data value, create a new design matrix Z_{t} from Z_{t-1}.

Usage

1
ForecastGibbs(dats_withexo, period, ztprop1, gibbs_mean, gibbs_var)

Arguments

dats_withexo

the dataset used to create the forecast. It consists of an enlarged zoo object with NA's in the forecast rows (except for exogenous variables). The dataset must be generated by DataInput().

period

the number of years to forecast. As of yet, the function does not support backcasting.

ztprop1

the model structure (a Ztprops object) to be used in determining the proper positions of each value.

gibbs_mean

the Mean component of the Gibbs simulation.

gibbs_var

the Var component of the Gibbs simulation.

Details

this function operates in three (3) parts:

  1. shift old values of the variables by 1 using the lag operator.

  2. reinsert shifted values in the proper positions of Z_{t}.

  3. replace lag 1 values with values from the OneStep object.

This produces a design matrix Z_{t} for the forecasted year.

Value

an array with dimensions (<number_of_forecasted_years>, <number_of_equations>, <number_of_iterations_in_Gibbs>).


gamalamboy/stresstest documentation built on May 17, 2019, 1:33 p.m.