Nothing
## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----setup--------------------------------------------------------------------
library(trtswitch)
library(dplyr, warn.conflicts = FALSE)
library(ggplot2)
## ----data---------------------------------------------------------------------
head(immdef, 10)
## ----analysis-----------------------------------------------------------------
data <- immdef %>% mutate(rx = 1-xoyrs/progyrs)
fit1 <- rpsftm(
data, time = "progyrs", event = "prog", treat = "imm",
rx = "rx", censor_time = "censyrs", boot = FALSE)
## ----logrank------------------------------------------------------------------
fit1$logrank_pvalue
## ----psi----------------------------------------------------------------------
c(fit1$psi, fit1$psi_CI)
## ----hr-----------------------------------------------------------------------
c(fit1$hr, fit1$hr_CI)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.