Estimate the Simultaneous Equations Model (SEM)
estimate.RdEstimate 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_seqobject (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_estimateobject (seeestimate) 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_seqobject containing details about the system of equations used in the model.- ts_data
The time-series data used for the estimation, with any
NAvalues 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.
Details
After estimation, use summary for a
full table of posterior summaries (with optional credible intervals and
texreg output) and print for a concise
console-friendly overview of the estimated system.
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
To create a
koma_seqobject seesystem_of_equations.For a comprehensive example of using
estimate, seevignette("koma").Related functions within the package that may be of interest:
forecast.