Skip to content

PStrata

1.0.1

Principal Stratification Analysis in R

0packages depend
3.9Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Bo LiuFirst published 2023-05-088 releasesCRAN page ↗GitHub ↗

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

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

Documentation

Documentation
READMEYes · 576 wordsVignettesNopkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
56%
Documented parameters
78%
Return-value docs
100%
References docs
8%

Downloads

3.9K
CRAN downloads in the past year
Rank #6,197 · ~11/day · ~321/mo
Daily download trend is not available in this view yet.
38230 days
1.6K90 days
3.9K1 year
Compare downloads with other packages →
Also on120 r2u29 autocran

Repository

Repository
7Stars
1Forks
5Open issues
0Open PRs
0Releases
85Commits
4Contributors
85 commits · Last activity 2026-05-17

Repository practices

Upstream repositoryBeta

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.

Reproducibility and dev environment (1)
data-raw/
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
7 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.5.0
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Code Composition
R 2,915 (83%)Rd 586 (17%)
Code characteristics
Object systems
S321
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

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

Datasets

Bundled datasets · 2
NameClassRows × ColsAlso ships in
sim_data_Coxdata.frame2,000 × 7
sim_data_normaldata.frame1,000 × 4

3 internal objects are bundled for the package's own use and not listed here.

People & History

People (2)
Maintainer (1)
Author, Maintainer
Authors (1)
Author, Maintainer
Contributors (1)
Contributor
Package Timeline

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

  • 1.0.1Latest
    2026-05-15 · current release · diff ↗
  • 1.0.0
    2026-05-14 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 0.1.0
    2026-03-08 · diff ↗
  • unarchivedReturned to CRAN
    2026-03-08
  • archivedRemoved from CRAN
    2025-11-28
    issues were not corrected despite reminders
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 0.0.5
    2023-12-03 · diff ↗
  • 0.0.4
    2023-11-16 · diff ↗
  • 0.0.3
    2023-10-18 · diff ↗
  • unarchivedReturned to CRAN
    2023-10-18
  • archivedRemoved from CRAN
    2023-08-10
    issues were not corrected in time
  • 0.0.2
    2023-07-17 · diff ↗
  • 0.0.1
    2023-05-08
  • R
    R 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
Report a problem with this page →