Skip to content

trtswitch

0.2.7

Treatment Switching

0packages depend
5.6Kdownloads / year
55.4%test coverage
13/13checks pass

Overview

About
Maintained by Kaifeng LuFirst published 2024-10-1718 releasesCRAN page ↗GitHub ↗

Implements rank preserving structural failure time model (RPSFTM), iterative parameter estimation (IPE), inverse probability of censoring weights (IPCW), marginal structural model (MSM), simple two-stage estimation (TSEsimp), and improved two-stage estimation with g-estimation (TSEgest) methods for treatment switching in randomized clinical trials.

Install

Health

CRAN checks
13OK
Slowest check: 12.6 min · r-oldrel-windows-x86_64
Code health
Yes
Tests · ratio 0.15
55.4%
Coverage · measured lines
100%
Documentation · exports
7
Dependencies · direct
Check history
  • OK2026-08-04
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-04-25
    12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-04-22
    12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-04-18
    11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
Show 1 earlier snapshots
  • NOTE2026-03-10
    12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 71 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
96%
Documented parameters
99%
Return-value docs
100%
References docs
30%

Downloads

5.6K
CRAN downloads in the past year
Rank #5,253 · ~15/day · ~465/mo
Daily download trend is not available in this view yet.
25730 days
1.6K90 days
5.6K1 year
Compare downloads with other packages →
Also on500 r2u16 autocran

Repository

Repository
2Stars
2Forks
0Open issues
0Open PRs
0Releases
617Commits
1Contributors
617 commits · Last activity 2026-06-25 · 0% stars, 30d

Stars over time

2025-10-14 · 12026-07-07 · 2

Repository practices

Upstream repositoryBeta

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

Checks run against github.com/kaifenglu/trtswitch on 2026-08-09.

Continuous integration (1)
GitHub Actions
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
16 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.5
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Code & Tests

Datasets

People & History

People (1)
Maintainer (1)
Author, Maintainer
Authors (1)
Author, Maintainer
Package Timeline

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

  • 0.2.7Latest
    2026-06-26 · current release · diff ↗
  • 0.2.6
    2026-05-27 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 0.2.5
    2026-03-14 · diff ↗
  • 0.2.4
    2026-02-12 · diff ↗
  • 0.2.3
    2026-01-10 · diff ↗
  • 0.2.2
    2025-11-16 · diff ↗
  • 0.2.1
    2025-11-06 · diff ↗
  • 0.2.0
    2025-10-06 · diff ↗
  • 0.1.9
    2025-09-03 · diff ↗
  • 0.1.8
    2025-07-12 · diff ↗
  • 0.1.7
    2025-06-05 · diff ↗
  • 0.1.6
    2025-04-25 · diff ↗
  • 0.1.5
    2025-04-24 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.1.4
    2025-03-20 · diff ↗
Show 7 earlier events
  • 0.1.3
    2025-02-06 · diff ↗
  • 0.1.2
    2024-12-05 · diff ↗
  • 0.1.1
    2024-11-02 · diff ↗
  • unarchivedReturned to CRAN
    2024-11-02
  • archivedRemoved from CRAN
    2024-11-01
    issues were not corrected in time
  • 0.1.0
    2024-10-17
  • R
    R 4.4.0 released · 2024-04-24

Package metadata

First published
2024-10-17
Total releases
18 / 2 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 3.5
Bundled data
140 KB / 12 files
Download size
568 KB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("trtswitch")
Lu, K. (2026). trtswitch: Treatment Switching (Version 0.2.7) [Computer software]. https://doi.org/10.32614/CRAN.package.trtswitch

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

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 trtswitch version 0.2.7 [Data set]. HJJB, LLC. Data release v2026-08-09. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-09, 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