Skip to content

BayesPocket

Bayesian Causal Inference for Periodontal Diseases in Longitudinal Studies

v0.1.0 · May 13, 2026 · GPL (>= 3)

Description

Implements the Mixed Treatment-State Causal Model (MTSCM), a Bayesian framework for estimating causal effects of clinical interventions on bounded continuous outcomes in longitudinal observational studies with irregular visits. The methodology is specifically designed for periodontal disease research, where discrete treatments and continuous disease states (e.g., proportion of periodontal pockets exceeding 3 mm) reciprocally influence one another under dynamic feedback. The package integrates a double-censored Tobit likelihood to handle boundary mass at zero and one, subject-specific random effects to capture within-subject correlation, and flexible tree-based ensemble priors (standard BART and Soft BART) to model complex nonlinear interactions without parametric restrictions. Causal identification is established under the potential outcomes framework via the G-computation formula, with key estimands including the Mixed Average Potential Outcome (MAPO) and the Mixed Probability of Disease Resolution (MPDR). The package provides functions for model fitting, posterior inference, and causal estimand estimation.

Downloads

CRAN

425

Last 30 days

10082nd

791

Last 90 days

791

Last year

Trend: +16.1% (30d vs prior 30d)

r2u CRAN

1

Last 30 days

10

Last 90 days

10

Last year

Trend: -88.9% (30d vs prior 30d)

autoCRAN

5

Last 7 days

15

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

package dependencies

Package required but not available: ‘SoftBart’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 7 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 14, 2026

Code

Structure

Lines of code

1,558

Files

18

Compiled share

0%

Has compiled src

No

Language breakdown

R 1,261 (80.9%)Docs 297 (19.1%)

API

Exported functions

3

Internal functions

14

Recent export changes

v0.1.0+3 causal_estimand_inference, causal_inference_model, data_generation

Testing & CI

Has tests

No

Test-to-code ratio

0.00

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

No

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

0

Dep constraint coverage

100%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

3.5

System requirements

C++ standard

License

GPL (>= 3)

License flags

SPDX valid, OSI approved

History

Versions

1

First release

2026-05-13

Latest release

2026-05-13

Avg cadence

Cold removal rate

Dep drift

0

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Dependency Network

Dependencies Reverse dependencies GIGrvg truncnorm progress stochtree SoftBart pbmcapply BayesPocket

Version History

1 tracked
new 0.1.0 May 13, 2026