Skip to content

BCT

1.3

Bayesian Context Trees for Discrete Time Series

0packages depend
229downloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Valentinian Mihai LunguFirst published 2026-08-044 releasesCRAN page ↗

An implementation of a collection of tools for exact Bayesian inference with discrete times series. This package contains functions that can be used for prediction, model selection, estimation, segmentation/change-point detection and other statistical tasks. Specifically, the functions provided can be used for the exact computation of the prior predictive likelihood of the data, for the identification of the a posteriori most likely (MAP) variable-memory Markov models, for calculating the exact posterior probabilities and the AIC and BIC scores of these models, for prediction with respect to log-loss and 0-1 loss and segmentation/change-point detection. Example data sets from finance, genetics, animal communication and meteorology are also provided. Detailed descriptions of the underlying theory and algorithms can be found in [Kontoyiannis et al. 'Bayesian Context Trees: Modelling and exact inference for discrete time series.' Journal of the Royal Statistical Society: Series B (Statistical Methodology), April 2022. Available at: doi:10.48550/arXiv.2007.14900 [stat.ME], July 2020] and [Lungu et al. 'Change-point Detection and Segmentation of Discrete Data using Bayesian Context Trees' doi:10.48550/arXiv.2203.04341 [stat.ME], March 2022].

Install

Health

CRAN checks
13OK
Slowest check: 2.8 min · r-devel-windows-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
5
Dependencies · direct
Check history
  • OK2026-08-04
    7 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesNopkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
100%
References docs
32%

Downloads

229
CRAN downloads in the past year
Rank #24,444 · ~1/day · ~19/mo
Daily download trend is not available in this view yet.
18830 days
18890 days
2291 year
Compare downloads with other packages →
Also on382 r2u17 autocran

Dependencies

Declared dependencies
4 external dependencies (excludes base and recommended)
Depends (1)
R >= 4.0
Imports (5)
RcppstringrigraphgrDevicesgraphics
LinkingTo (1)
Suggests (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Datasets

People & History

People (3)
Maintainer (1)
Author, Maintainer
Authors (3)
Listed in earlier versions (1)
no longer listed · 1.3
Package Timeline

4 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 1.3Latest
    2026-08-04 · current release · diff ↗
  • unarchivedReturned to CRAN
    2026-08-04
  • R
    R 4.6.0 released · 2026-04-24
  • archivedRemoved from CRAN
    2025-12-21
    issues were not corrected in time
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 1.2
    2022-05-12 · diff ↗
  • unarchivedReturned to CRAN
    2022-05-12
  • R
    R 4.2.0 released · 2022-04-22
  • archivedRemoved from CRAN
    2022-02-20
    issues were not corrected despite reminders Compilation errors with C++17
  • R
    R 4.1.0 released · 2021-05-18
  • 1.1
    2020-12-07 · diff ↗
  • 1.0
    2020-11-23
  • R
    R 4.0.0 released · 2020-04-24

Package metadata

First published
2026-08-04
Total releases
4 / 1 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 4.0
Bundled data
31 KB / 8 files
Download size
not tracked yet
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("BCT")
Lungu, V. M., Kontoyiannis, I., & Papageorgiou, I. (2026). BCT: Bayesian Context Trees for Discrete Time Series (Version 1.3) [Computer software]. https://doi.org/10.32614/CRAN.package.BCT

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for BCT version 1.3 [Data set]. HJJB, LLC. Data release v2026-08-13. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-13, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy