Pólya Tree Type Models
Overview
Fits Bayesian nonparametric models based on Pólya tree processes, including adaptive Pólya trees, Markov adaptive Pólya trees, optional Pólya trees, and their conditional-density counterparts. Methods are described in Ma (2017) doi:10.1214/16-BA1021, Ma (2017) doi:10.1214/17-EJS1254, and Wong and Ma (2010) doi:10.1214/09-AOS755.
Correctness
- Fixes undefined behavior in conditional hierarchical MAP partition output caused by using an unsigned counter with
-1as its initial sentinel. - Uses 64-bit node offsets to avoid truncation when indexing larger trees.
- Rejects predictor/response dimension and shrinkage-state configurations that exceed the capacity of the internal partition representation.
Validation
- Adds regression checks for conditional partition boundaries and supported input capacities.
- Audits the remaining bit shifts and verifies the package examples, tests, and demos with undefined-behavior and address sanitizers.
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-08
- ERROR12 OK, 1 ERROR2026-09-07
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK8 OK2026-07-23
Documentation
- Help pages
- 7 (1 internal)includes a package overview page
- Examples that run
- 100%6 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 56%
- Return-value docs
- 100%
- Help pages citing references
- 43%
Also includes 7 demo scripts (run with demo())
Downloads
Repository
- PRs merged (all time)
- 67%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 0
3 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/mastatlab/ptt on 2026-10-21.
Dependencies
Installing PTT adds 2 packages (2 with compiled code, 2.8 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppArmadillo 1.0 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.0.1Latest
- 1.02026-07-22
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-07-22
- Total releases
- 2 / 1 yrs
- License
- GPL (>= 3) OSI
- Download size
- 37 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("PTT")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1214/16-ba1021, 10.1214/17-ejs1254, 10.1214/09-aos755.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.