Skip to contents

Estimate a system of simultaneous equations model (SEM) using a Bayesian approach. This function incorporates Gibbs sampling and allows for both density and point forecasts.

Usage

estimate(
  ts_data,
  sys_eq,
  dates,
  ...,
  options = list(),
  point_forecast = NULL,
  estimates = NULL
)

Arguments

ts_data

Time-series data set for the estimation.

sys_eq

A koma_seq object (system_of_equations) containing details about the system of equations used in the model.

dates

Key-value list for date ranges in various model operations.

...

Additional parameters.

options

Optional settings for modifying the Gibbs sampler specifications for all equations. See Gibbs Sampler Specifications.

point_forecast

A list that contains the following elements:

  • active: Determines the type of forecast generated. If TRUE, a point forecast is created. If FALSE, a density forecast is returned. Default is TRUE.

  • central_tendency: A character string indicating which central tendency measure ("mean" or "median") to use for summary statistics. Default is "mean".

estimates

Optional. A koma_estimate object (see estimate) containing the estimates of the previously estimated simultaneous equations model. Use this parameter when some equations of the system need to be re-estimated.

Value

An object of class koma_estimate.

An object of class koma_estimateis a list containing the following elements:

estimates

The estimated parameters and other relevant information obtained from the model.

sys_eq

A koma_seq object containing details about the system of equations used in the model.

ts_data

The time-series data used for the estimation, with any NA values removed and lagged variables created.

y_matrix

The Y matrix constructed from the balanced data, used in the estimation process.

x_matrix

The X matrix constructed from the balanced data, used in the estimation process.

gibbs_specifications

The specifications used for the Gibbs sampling.

Parallel

This function provides the option for parallel computing through the future::plan() function. For a detailed example on executing estimate in parallel, see the vignette: vignette("parallel"). For more details, see the future package documentation.

Gibbs Sampler Specifications

  • ndraws: Integer specifying the number of Gibbs sampler draws. Default is 2000.

  • burnin_ratio: Numeric specifying the ratio for the burn-in period. Default is 0.5.

  • nstore: Integer specifying the frequency of stored draws. Default is 1.

  • tau: Numeric tuning parameter for enforcing an acceptance rate. Default is 1.1.

See also