Package: koma 0.4.1

koma: Bayesian Simultaneous Equation Models for Forecasting

Estimate and forecast Bayesian simultaneous equation models for macroeconomic time series. Provides tools to specify systems of behavioral equations and accounting identities, transform and manage time series, simulate from the posterior using a Metropolis-within-Gibbs sampler, and generate unconditional and conditional forecasts with user-defined priors and restrictions. Methods are described in Rathke A. and Sarferaz S. (forthcoming) "Bayesian Estimation of Simultaneous Equations Model".

Authors:Samad Sarferaz [aut, cph], Merlin Scherer [aut, cre, cph], Laurent Florin [ctb], Andrew D. Martin [ctb, cph], Kevin M. Quinn [ctb, cph], Jong Hee Park [ctb, cph], Bill Venables [ctb, cph], Brian D. Ripley [ctb, cph]

koma_0.4.1.tar.gz
koma_0.4.1.zip(r-4.7-any)koma_0.4.1.zip(r-4.6-any)koma_0.4.1.zip(r-4.5-any)
koma_0.4.1.tgz(r-4.6-any)koma_0.4.1.tgz(r-4.5-any)
koma_0.4.1.tar.gz(r-4.7-any)koma_0.4.1.tar.gz(r-4.6-any)
koma_0.4.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
koma/json (API)

# Install 'koma' in R:
install.packages('koma', repos = c('https://timothymerlin.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/timothymerlin/koma/issues

Pkgdown/docs site:https://timothymerlin.github.io

Datasets:

On CRAN:

Conda:

7.09 score 7 stars 15 scripts 277 downloads 28 exports 19 dependencies

Last updated from:a033def2aa. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK170
source / vignettesOK277
linux-releaseOK179
macos-releaseOK130
macos-oldrelOK152
windows-develOK109
windows-releaseOK156
windows-oldrelOK166
wasm-releaseOK112

Exports:acf_plotas_etsas_listas_metsconcatestimateetsextract.koma_estimatefilter_by_attributeforecastgenerate_sample_dataget_koma_attr_policyhdihdrinit_koma_themeis_etsis_system_of_equationslevelmodel_evaluationmodel_identificationraterebasereset_koma_attr_policyrunning_meanrunning_mean_plotset_koma_attr_policysystem_of_equationstrace_plot

Dependencies:clicodetoolsdigestdoFutureforeachfuturefuture.applyglobalsglueiteratorslifecyclelistenvmagrittrparallellyprogressrpurrrrlangtempdisaggvctrs

Equation Syntax Reference
Overview | 1. Stochastic Equations | 2. Identity Equations | 3. Injected Parameters | 4. Lag Notation | 5. Priors | 6. Equation-specific Tau | 7. Dummy Variables

Last update: 2026-10-08
Started: 2026-01-10

Estimating and Forecasting with the koma Package
Overview | Define a small system | Build the system | Pick estimation and forecast ranges | Prepare the data | Estimate the model | Forecast and inspect

Last update: 2026-08-03
Started: 2026-01-10

Extended Time Series (ets)
Overview | Create an ets | Windowing and extending | Rates, levels, and anchors | Rebasing and aggregation | Arithmetic and subsetting | Using plain ts with estimate()

Last update: 2026-08-03
Started: 2026-01-10

Executing koma in Parallel
Introduction | Preliminaries | Sequential Execution | Parallel Execution with future::plan | Worker Setup | Windows | Linux | macOS

Last update: 2026-06-02
Started: 2026-01-10

Estimating Klein's Model I
Equations of Klein's Model | Stochastic equations | Equilibrium condition | Identities | Defining Klein's Model in R | Creating the SEM | Defing the Estimation and Forecast Dates | Preparing the Data | Estimating the Model | Forecasting

Last update: 2026-05-13
Started: 2026-01-10

Estimating Small Macro Model for Switzerland
Equations of the Small Macro Model | Defining the SEM in R | Creating the SEM | Defing the Estimation and Forecast Dates | Preparing the Data | Estimating the Model | Diagnostics | Forecasting | Conditional Forecasting

Last update: 2026-05-13
Started: 2026-01-10

MCMC Diagnostics for Estimated SEM
Overview | Build a Small Model | Prepare Data and Estimate | Trace Plots | Running Means | Autocorrelation Function (ACF) Plots | Interactive Diagnostics

Last update: 2026-02-27
Started: 2026-02-27

Highest Probability Density (HPD): HDR and HDI
Overview | Draws-based HPD summaries | Tuning HDR estimation | HDR and HDI from model estimates

Last update: 2026-02-27
Started: 2026-02-27

Error Correction in a Small Open Economy Model
Overview | Export ECM Intuition | Define the SEM | Create the SEM | Preparing the Data | Estimation and Forecast Dates | Estimating the Model | Forecasting

Last update: 2026-01-15
Started: 2026-01-15

Readme and manuals

Help Manual

Help pageTopics
Autocorrelation Function Plots for koma_estimate Objectsacf_plot
Convert an mets koma_ts object to a listas_list as_list.list as_list.mts
Convert a list object with ets koma_ts objects to a koma_ts multivariate time series (mets)as_mets as_mets.list
Concatenate two time seriesconcat concat.list concat.mts concat.ts
Estimate the Simultaneous Equations Model (SEM)estimate estimate.list
Extract a texreg summary from a koma_estimateextract.koma_estimate
Filter a koma_ts object by attribute valuefilter_by_attribute filter_by_attribute.list filter_by_attribute.mts
Forecast the Simultaneous Equations Model (SEM)forecast forecast.koma_estimate
Format System of Equationsformat.koma_seq
Generate Data for the Simultaneous Equations Modelgenerate_sample_data
Look up the registered policy for a koma_ts attributeget_koma_attr_policy
Highest Density Intervals from Drawshdi hdi.default
Highest Density Intervals for koma_estimate Objectshdi.koma_estimate
Highest Density Intervals for koma_forecast Objectshdi.koma_forecast
Highest Density Regions from a Kernel Density Estimatehdr hdr.default
Highest Density Regions for koma_estimate Objectshdr.koma_estimate
Highest Density Regions for koma_forecast Objectshdr.koma_forecast
Initiate Default Themeinit_koma_theme
Check if Object is a System of Equationsis_system_of_equations
Klein macroeconomic time series (1970 Q1 onward)klein
koma: Large Scale Macroeconomic Modelkoma-package koma
Extended Time-Series Objectas_ets ets is_ets koma_ts
Compute the level for a time serieslevel level.list level.mts level.ts
Calculate Out-of-Sample RMSE for a Specified Horizonmodel_evaluation
Identify Model Parameters from Character Matricesmodel_identification
Plot HDRs for koma_estimate Objectsplot.koma_estimate_hdr
Plot koma Forecastsplot.koma_forecast
Print method for koma_estimate objectsprint.koma_estimate
Print Method for koma_forecast Objectsprint.koma_forecast
Print method for koma_hdi objectsprint.koma_hdi
Print method for koma_hdr objectsprint.koma_hdr
Print System of Equationsprint.koma_seq
Compute the rate of change for a time seriesrate rate.list rate.mts rate.ts
Rebase Time Series Data Relative to a Base Periodrebase rebase.list rebase.mts rebase.ts
Remove a registered koma_ts attribute policyreset_koma_attr_policy
Running Means for koma_estimate Objectsrunning_mean
Running Mean Plots for koma_estimate Objectsrunning_mean_plot
Register metadata behavior for a koma_ts attributeset_koma_attr_policy
Simulated SEM example datasimulated_sem
Quarterly time series of key macro variables for a small open economy (Switzerland)small_open_economy
Summary method for koma_estimate objectssummary.koma_estimate
Summary for koma_estimate_hdi Objectssummary.koma_estimate_hdi
Summary for koma_estimate_hdr Objectssummary.koma_estimate_hdr
Summary for koma_forecast Objectssummary.koma_forecast
Summary for koma_forecast_hdi Objectssummary.koma_forecast_hdi
Summary for koma_forecast_hdr Objectssummary.koma_forecast_hdr
Summary for koma_hdi Objectssummary.koma_hdi
Summary for koma_hdr Objectssummary.koma_hdr
System of Equations Classsystem_of_equations
Trace Plots for koma_estimate Objectstrace_plot