Welcome to ClientVPS Mirrors

README

trtswitch

trtswitch provides methods for treatment switching adjustment in randomized clinical trials, including:

Installation

Install from GitHub:

# install.packages("remotes")
remotes::install_github("kaifenglu/trtswitch")

Example: RPSFTM

library(trtswitch)
library(dplyr)

# Build treatment exposure proportion used by rpsftm
# in the one-way switching example dataset.
data <- immdef %>%
  mutate(rx = 1 - xoyrs / progyrs)

fit <- rpsftm(
  data = data,
  id = "id",
  time = "progyrs",
  event = "prog",
  treat = "imm",
  rx = "rx",
  censor_time = "censyrs",
  boot = FALSE
)

fit

# Key estimates
fit$psi
fit$hr
fit$psi_CI
fit$hr_CI

Documentation

Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.

This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.