Learn R Programming

trtswitch (version 0.1.8)

Treatment Switching

Description

Implements rank-preserving structural failure time model (RPSFTM), iterative parameter estimation (IPE), inverse probability of censoring weights (IPCW), and two-stage estimation (TSE) methods for treatment switching in randomized clinical trials.

Copy Link

Version

Install

install.packages('trtswitch')

Monthly Downloads

481

Version

0.1.8

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Kaifeng Lu

Last Published

July 12th, 2025

Functions in trtswitch (0.1.8)

ingots

The binary data from Cox and Snell (1989, pp. 10-11).
immdef

Simulated CONCORDE trial data from the rpsftm package
ipcw

Inverse Probability of Censoring Weights (IPCW) Method for Treatment Switching
recensor_sim_rpsftm

Simulation Study to Evaluate Recensoring Rules in RPSFTM
rawdata

A simulated time-to-event data set with 10 replications
logisregr

Logistic Regression Models for Binary Data
liferegr

Parametric Regression Models for Failure Time Data
ipe

Iterative Parameter Estimation (IPE) for Treatment Switching
qrcpp

QR Decomposition of a Matrix
print.phregr

Print phregr Object
nscpp

Natural Cubic Spline Basis
phregr

Proportional Hazards Regression Models
sexagg

Urinary tract infection data from the logistf package
rpsftm

Rank Preserving Structural Failure Time Model (RPSFTM) for Treatment Switching
rmdiff

Estimate of Restricted Mean Survival Time Difference
six

The repeated measures data from the "Six Cities" study of the health effects of air pollution (Ware et al. 1984).
survfit_phregr

Survival Curve for Proportional Hazards Regression Models
survsplit

Split a survival data set at specified cut points
tsegest

The Two-Stage Estimation (TSE) Method Using g-estimation for Treatment Switching
tsegestsim

Simulate Survival Data for Two-Stage Estimation Method Using g-estimation
tobin

Tobin's tobit data from the survival package
splineDesigncpp

B-Spline Design Matrix
survQuantile

Brookmeyer-Crowley Confidence Interval for Quantiles of Right-Censored Time-to-Event Data
rmest

Estimate of Restricted Mean Survival Time
tssim

Simulate Data for Treatment Switching
tsesimp

The Simple Two-Stage Estimation (TSE) Method for Treatment Switching
trtswitch-package

Treatment Switching
bscpp

B-Spline Basis for Polynomial Splines
findInterval3

Find Interval Numbers of Indices
kmdiff

Estimate of Milestone Survival Difference
kmest

Kaplan-Meier Estimates of Survival Curve
heart

Stanford heart transplant data from the survival package
aml

Acute myelogenous leukemia survival data from the survival package
print.logisregr

Print logisregr Object
msm

Marginal Structural Model (MSM) Method for Treatment Switching
lrtest

Log-Rank Test of Survival Curve Difference
print.liferegr

Print liferegr Object
residuals_liferegr

Residuals for Parametric Regression Models for Failure Time Data
residuals_phregr

Residuals for Proportional Hazards Regression Models
shilong

The randomized clinical trial SHIVA data in long format from the ipcwswitch package