Skip to content

tulpa

0.7.5Package record

Templated Unified Library for Posterior Approximation in Bayesian Hierarchical Models

0packages depend
920downloads / year
–test coverage
13/13flavors OK

Overview

About

A general-purpose engine for fitting Bayesian hierarchical models with spatial fields, temporal effects, spatially varying coefficients, and multiple inference backends. Scalable spatial structure includes Hilbert space approximate Gaussian processes (HSGP; Riutort-Mayol et al. 2023 doi:10.1007/s11222-022-10167-2), nearest-neighbor Gaussian processes (NNGP; Datta et al. 2016 doi:10.1080/01621459.2015.1044091), intrinsic conditional autoregressive models (ICAR; Besag, York, and Mollie 1991 doi:10.1007/BF00116466), the reparameterized Besag-York-Mollie model (BYM2; Riebler et al. 2016 doi:10.1177/0962280216660421), and stochastic partial differential equation fields (SPDE; Lindgren, Rue, and Lindstrom 2011 doi:10.1111/j.1467-9868.2011.00777.x). Temporal structure covers random walks, autoregressive processes, and Gaussian processes. Inference is tiered by correctness guarantee: exact Hamiltonian Monte Carlo with the No-U-Turn sampler, Laplace and nested Laplace approximations with hyperparameter integration (Rue, Martino, and Chopin 2009 doi:10.1111/j.1467-9868.2008.00700.x), and variational inference. Model-specific packages plug observation likelihoods into the engine through a templated C++ callback interface.

Changes in 0.7.5
  • Three vignettes ship with the package (quickstart, inference modes, spatial models). The other ten (priors, temporal models, model comparison, calibration, reliability, data formatting, random slopes, EM + Laplace, checkpointing, custom latent processes) are articles on the package website, https://gillescolling.com/tulpa/articles/.
  • energy_bfmi() is exported: E-BFMI from a vector of per-iteration Hamiltonian energies and their chain ids, diffed within each chain and reported for the worst chain, so a model package's energy diagnostic uses the same computation as tulpa's.
  • print(summary(fit)) leaves out the Reliability section when the fit's record has nothing to report under it, as on a plain Laplace fit, instead of ending on a bare header (#961).
Show all changes in 0.7.5Hide the rest of the changes in 0.7.5
  • The Polya-Gamma Gibbs areal kernels (binomial ICAR, BYM2 and restricted ICAR, negative-binomial ICAR) sample the ICAR prior the other backends sample on a disconnected graph. Each component's level, an island's whole value, now carries the field's own precision, where the kernels gave it a flat prior and an island a near-flat N(0, 1000) one. On a chain with a separated island the Gibbs island read 14.5 against the sampler's 0.32 and pulled the mainland and the intercept with it; it now reads 0.30. A component with no observation is drawn from its prior instead of refused. On a connected graph nothing changes (#963).
  • field_effects() and posterior_predict() on a Gibbs BYM2 fit use the combined field sigma * (sqrt(rho) * s * phi + sqrt(1 - rho) * theta) that enters the linear predictor, where they summed the two unit-scale components (#964).
  • An isolated node is reported with what the field does with it: an ICAR field gives it its own N(0, 1 / tau) level and a BYM2 field unit variance on its structured part, both as a message; a proper CAR field leaves it without a prior and warns. The constructors had warned that every field is improper there (#962).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 24.7 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-10-17
  • WARNING12 OK, 1 WARNING2026-10-01
  • OK13 OK2026-09-25
  • ERROR12 OK, 1 ERROR2026-09-23
  • OK5 OK2026-09-10
Advisories

none known

Documentation

In release 0.7.5
README· In the repository, left out of the releaseVignettesYes · 3 · dynamicNEWSYes · 67% structured · mentions 0.7.5Citation fileYes · computed when R runs itWebsiteYes · pkgdown

The repository also keeps web-only articles.

Help pages
208 (16 internal)includes a package overview page
Examples that run
59%103 run in a plain check (1 of them under a condition) · 73 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
97%
Documented parameters
94%
Return-value docs
99%
Help pages citing references
14%

Downloads

920
CRAN downloads in the past year
Rank #12,162 · ~3/day · ~77/mo
Daily download trend is not available in this view yet.
50630 days
92090 days
9201 year
Compare downloads with other packages →
Also on38 r2u3 autocran

Repository

0Stars
0Forks
1Open issues
0Open PRs
109Releases
1,357Commits
5Commit identities
bayesianhierarchical-modelslaplace-approximationmcmcrr-packagerstatsspatial
1,357 commits · Last activity 2026-10-23
Responsiveness
How these are sampled
PRs merged (all time)
12%
Median days to close, 50 most recently updated closed issues
0
Median days to close, 50 most recently updated closed PRs
0

Releases over time

2026-09-10 · 922026-10-19 · 109
PracticesBeta

10 development-tooling and community-health practices detected across 7 families in the upstream repository

Checks run against github.com/gcol33/tulpa on 2026-10-25.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-10-23

pkgdown site last built 2026-10-22

Coverage (1)
Coverage reporting
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 3 practices
CRAN release process (1)
cran-comments.md
Research and citation (1)
CITATION.cff
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-03-29
    Seen in the repository: CLAUDE.md
    Named in .Rbuildignore: .claude, CLAUDE.md
    Named in .gitignore: .claude
    Pull request it wrote: opened by a project member
    Commits: 58 by its own account · at least 1,211 crediting it in the message
Shared conventions any agent may read, so they name no particular tool.
Seen in the repository: AGENTS.md
Models named in its commits
  • Claude Opus 4.796 commits · Apr to May 2026
  • Claude Fable 555 commits · Jul 2026
  • Claude Opus 4.837 commits · Jun to Jul 2026
  • Claude Sonnet 4.62 commits · Apr 2026
  • Claude Opus 4.61 commit · Mar 2026

Some of these counts are a minimum, because the search stopped before the oldest commits.

Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
29 external dependencies (excludes base and recommended)

Installing tulpa adds 5 packages (4 with compiled code, 4.5 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppEigen 1.7 MB, RcppParallel 744 KB.

Depends (1)
R >= 4.1.0
Imports (10)
RcppMatrixtulpaMeshgenericsstatstoolsutilsmethodsgraphicsgrDevices
LinkingTo (3)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (5)
Author, Maintainer since 0.2.0 (2026), Copyright holder
Contributor, Copyright holder
Sobol direction numbers in src/sobol_direction_numbers.h, BSD-3-clause
Contributor, Copyright holder
Sobol direction numbers in src/sobol_direction_numbers.h, BSD-3-clause
Copyright holder · added in 0.7.5
exp and log routines in src/fastmath.h and src/fastmath_data.cpp, MIT
Copyright holder · added in 0.7.5
WALNUTS transition in inst/include/tulpa/walnuts.h, ported from walnutpie, MIT
Releases (4)

Pick two releases to compare their code metrics.

  • 0.7.5Latest
    record
    2026-10-19 · current release · diff ↗ ·
    added 6 exports
    energy_bfmi, field_effects, tulpa_fit_summary, tulpa_joint_inner_vcov_mixture, tulpa_outer_grid, wbic
  • 0.6.0
    record
    2026-09-24 · diff ↗
  • 0.5.0
    record
    2026-09-21 · diff ↗ ·
    removed 2 exports
    laplace_diagnostics, mcmc_diagnostics
    added 22 exports
    auto_grid_place, family_names, pointwise_loglik, tulpa_batched_pareto_k, tulpa_grid_axis, tulpa_grid_log_quad, tulpa_hyper_check_copy_slab, tulpa_hyper_copy_slab_density, tulpa_hyper_draws, tulpa_hyper_grid_supports, tulpa_hyper_slice_home, tulpa_iter_progress, tulpa_joint_axis_specs_from_grid, tulpa_joint_grid_batch, tulpa_joint_inner_vcov_blocks, tulpa_normalise_weights_safe, tulpa_rpg, tulpa_spde_log_hyperprior, tulpa_spde_precision_Q, tulpa_theta_matrix, validate_gp, validate_temporal_multiscale
  • 0.2.0
    record
    2026-09-09
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-09-09
Total releases
4 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Download size
4.2 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("tulpa")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

The repository also keeps a CITATION.cff.

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 tulpa version 0.7.5 [Data set]. HJJB, LLC. Data release v2026-10-26. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-26, 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