KOMA - Large Macroeconomic Model
================

[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![codecov](https://codecov.io/gh/TimothyMerlin/koma/branch/main/graph/badge.svg?token=8X0PR1F6TP)](https://app.codecov.io/gh/TimothyMerlin/koma)

**koma** is an R package for Bayesian estimation of simultaneous
equation models (SEMs) using Metropolis-within-Gibbs Markov Chain Monte
Carlo (MCMC) methods.

> **⚠️ Beta Release**: `koma` is under active development. The
> user-facing API may still change before the first CRAN release. Core
> features are working but exported functions may change and bugs are
> possible. Please report issues on GitHub.

## Installation

Install the released version from CRAN:

``` r
install.packages("koma")
```

Or install the latest **development version** from GitHub:

``` r
# Install from GitHub
devtools::install_github("timothymerlin/koma")

# Or using renv
renv::install("github::timothymerlin/koma", rebuild = TRUE)
```

## Documentation

- **Getting started** → [Getting started with
  koma](https://timothymerlin.github.io/koma/articles/koma-getting-started.html)
- **Equation syntax** → [Equation syntax
  reference](https://timothymerlin.github.io/koma/articles/koma-equations.html)
- **Extended time series** → [Extended time series
  (ets)](https://timothymerlin.github.io/koma/articles/koma-extended-timeseries.html)
- **Parallelization** → [Executing koma in
  parallel](https://timothymerlin.github.io/koma/articles/koma-parallel.html)
- **Example: Klein model** → [Estimating Klein’s Model
  I](https://timothymerlin.github.io/koma/articles/koma-klein.html)
- **Example: small macro model** → [Estimating small macro model for
  Switzerland](https://timothymerlin.github.io/koma/articles/koma-small-macro-model.html)

## Development

### Creating a new Version

Increment the package version using `usethis`:

``` r
# Increment the version number (patch/minor/major)
usethis::use_version()
```

This updates the `DESCRIPTION` file.

#### Commit changes and tag the release

After updating the version:

``` bash
# Stage all changes
git add .

# Commit with a clear message
git commit -m "Incrementing version to x.x.x"

# Tag the release (protected)
git tag x.x.x

# Tag the latest release (unprotected, movable)
git tag -f latest
```

- `x.x.x` is the new semantic version (e.g. `0.1.0`).
- Protected tags (like `x.x.x`) are immutable to ensure release
  integrity.
- `latest` is an uprotected tag that can be moved to point to the newest
  release.

#### Push branch and tags

``` bash
# Push commits
git push

# Push both tags
git push origin --tags
```
