sectorgap0.1.0 package

Consistent Economic Trend Cycle Decomposition

add_cycle

Add a cycle to a state space model

add_error

Add error to state equation

add_init_mat

Add initialization matrices to state space model

add_lag

Add lags to state equation

add_trend

Add a trend to a state space model

aggregate_gap

Output gap contributions

compute_gaps

Gaps of observation equations

compute_mcmc_results

Results for sampled parameters and states

compute_weights

Computes weights from sub sector data

define_ssmodel

State space model

draw_output_gap

Draws the parameters of the output gap..

draw_trend_innovations

Draws (correlated) trend variances.

draw_variance_multi

Draws a variance from an inverse Wishart distribution. .

draw_variance_scalar

Draws a variance from an inverse Wishart distribution.

estimate_ssmodel

Bayesian estimation via Gibbs sampling

geweke_test

Geweke test for convergence

helper_posterior_assignment

Settings for draws from posterior

hpd_interval

Highest posterior density interval (HPDI)

hpfilter

HP filter

initialize_prior

Prior distribution

initialize_settings

Model settings

initialize_ss

Initializes a state space model

is.settings

Settings object validity check

matmult3d

array multiplication

mcmc_summary

MCMC summary statistics

mvrnorm

Draws from the multivariate normal distribution.

pct

Computes the period on period percentage change

plot.ss_fit

Plots of results

plot_densities

Prior and posterior plots

plot_time_series

Time series plots

plot_trace

Prior and posterior plots

post_regression

Draws the parameters in a regression equation with AR errors, if speci...

postARp

Draws the parameters of an AR process (AR parameters and variance).

postARp_phi

Draws the autoregressive parameters of an AR process (AR parameters on...

prepate_data

Input data

print.prior

Print prior object

print.settings

Print settings object

print.ss_fit

Print ss_fit object.

print.ss_model

Print ss_model object

results_state

MCMC summary statistics for states

settings_to_df

Data frames with model settings

substr_r

Extracts last letter in string

transform_results

Format results

ts_c

Creates a constant time series with same dates and frequency as the on...

update_nonlinear_constraints

Non linear constraints update

update_ssmodel

State space model update

Determining potential output and the output gap - two inherently unobservable variables - is a major challenge for macroeconomists. 'sectorgap' features a flexible modeling and estimation framework for a multivariate Bayesian state space model identifying economic output fluctuations consistent with subsectors of the economy. The proposed model is able to capture various correlations between output and a set of aggregate as well as subsector indicators. Estimation of the latent states and parameters is achieved using a simple Gibbs sampling procedure and various plotting options facilitate the assessment of the results. For details on the methodology and an illustrative example, see Streicher (2024) <https://www.research-collection.ethz.ch/handle/20.500.11850/653682>.

  • Maintainer: Sina Streicher
  • License: GPL-3
  • Last published: 2024-01-22