PStrata
1.0.1Principal Stratification Analysis in R
Overview
Estimating causal effects in the presence of post-treatment confounding using principal stratification. 'PStrata' allows for customized monotonicity assumptions and exclusion restriction assumptions, with automatic full Bayesian inference supported by 'Stan'. The main workflow is PStrataModel() to specify the model, fit() to run MCMC sampling, estimate() to extract potential outcomes, and contrast() to compute causal effects. Visualization tools are provided for diagnosis and interpretation. See Liu and Li (2023) doi:10.48550/arXiv.2304.02740 for details.
Install
Health
- OK2026-03-1010 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 56%
- Documented parameters
- 78%
- Return-value docs
- 100%
- References docs
- 8%
Downloads
Repository
Repository practices
2 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/laubok/pstrata on 2026-07-19.
Dependencies
Nothing depends on this yet.
Code & Tests
- Cyclomatic complexity
- 3.0 median / 11 max
Test coverage
Line coverage
–
Expression
–
Tests / Examples
–
Functions
101 20 exported
Complexity
3.1 avg / 11 max
Call network
101 nodes / 93 edges
Call graph
Open call graph →Lowest coverage
Per-function coverage is not measured for this package yet.
Datasets
| Name | Class | Rows × Cols | Also ships in |
|---|---|---|---|
| sim_data_Cox | data.frame | 2,000 × 7 | – |
| sim_data_normal | data.frame | 1,000 × 4 | – |
3 internal objects are bundled for the package's own use and not listed here.
People & History
8 releases. Pick two to compare their code metrics. R releases are shown for context.
- 1.0.1Latest
- 1.0.02026-05-14 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 0.1.02026-03-08 · diff ↗
- unarchivedReturned to CRAN2026-03-08
- archivedRemoved from CRAN2025-11-28issues were not corrected despite reminders
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.0.52023-12-03 · diff ↗
- 0.0.42023-11-16 · diff ↗
- 0.0.32023-10-18 · diff ↗
- unarchivedReturned to CRAN2023-10-18
- archivedRemoved from CRAN2023-08-10issues were not corrected in time
- 0.0.22023-07-17 · diff ↗
- 0.0.12023-05-08
- RR 4.3.0 released · 2023-04-21
Package metadata
- First published
- 2023-05-08
- Total releases
- 8 / 3 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 44 KB / 2 files
- Download size
- 87 KB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet