-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.rmd
99 lines (74 loc) · 4.18 KB
/
README.rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
output: github_document
---
<!-- markdownlint-disable-file -->
<!-- README.md needs to be generated from README.Rmd. Please edit that file -->
# simIDM <img src="man/figures/logo.png" align="right" height="139" />
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
<!-- badges: start -->
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![CRAN status](https://www.r-pkg.org/badges/version-last-release/simIDM)](https://www.r-pkg.org/badges/version-last-release/simIDM)
[![CRAN monthly downloads](https://cranlogs.r-pkg.org/badges/simIDM)](https://cranlogs.r-pkg.org/badges/simIDM)
[![CRAN total downloads](https://cranlogs.r-pkg.org/badges/grand-total/simIDM)](https://cranlogs.r-pkg.org/badges/grand-total/simIDM)
[![Code Coverage](https://raw.githubusercontent.com/insightsengineering/simIDM/_xml_coverage_reports/data/main/badge.svg)](https://raw.githubusercontent.com/insightsengineering/simIDM/_xml_coverage_reports/data/main/coverage.xml)
<!-- badges: end -->
\
Survival multistate models are a powerful and flexible tool for modeling and analyzing complex time-to-event data.
The three-state illness-death model can be used to jointly model the oncology endpoints
progression-free survival (PFS) and overall survival (OS). Jointly modeling the endpoints PFS and OS with the illness-death
model has the major
advantage of both adequately accounting for the correlation of the two endpoints and eliminating the need of the strong
assumption of proportional hazards. This package provides the tools to simulate a large number of clinical trials with
endpoints OS and PFS based on the illness-death model, which can be used for trail planning, for example. The simulation
set-up allows random and event-driven censoring, an arbitrary number of treatment arms, staggered study entry and drop-out.
Exponentially, Weibull and piecewise exponentially distributed survival times can be generated.
In addition, the correlation between PFS and OS can be calculated based on the simulation scenario, or estimated from a given data set.
**Scope:**
* Simulation of the illness-death model with constant, Weibull or piecewise constant transition hazards.
* Conversion of the transition times to PFS and OS survival times.
* Correlation between PFS and OS survival times can be calculated.
**Main Features:**
* Exponentially, Weibull and piecewise exponentially distributed survival times.
* Random censoring and event-driven censoring after a pre-specified number of PFS or OS events.
* Arbitrary number of treatment arms and flexible randomization ratio.
* Staggered study entry.
* Derivation of PFS and OS survival functions from transition hazards.
* Correlation between PFS and OS can be estimated from a given data set.
## Installation
### Release
You can install the current release version from *CRAN* with:
```{r cran-installation, eval = FALSE}
install.packages("simIDM")
```
### Development
You can install the current development version from *GitHub* with:
```{r gh-installation, eval = FALSE}
if (!require("remotes")) {
install.packages("remotes")
}
remotes::install_github("insightsengineering/simIDM")
```
## Getting Started
See also the [quick start](https://insightsengineering.github.io/simIDM/latest-tag/articles/quickstart.html) vignette or get started by trying out this example:
```{r getting-started, results = 'hide'}
library(simIDM)
transitionGroup1 <- exponential_transition(h01 = 1.2, h02 = 1.5, h12 = 1.6)
transitionGroup2 <- exponential_transition(h01 = 1, h02 = 1.3, h12 = 1.7)
simStudies <- getClinicalTrials(
nRep = 100, nPat = c(50, 50), seed = 1234, datType = "1rowPatient",
transitionByArm = list(transitionGroup1, transitionGroup2), dropout = list(rate = 0.1, time = 12),
accrual = list(param = "intensity", value = 12)
)
```
We get as output a list with `nRep` elements, each containing a data set of a single simulated trial.
```{r print}
head(simStudies[[1]])
```
## Citing `simIDM`
To cite `simIDM` please see [here](https://insightsengineering.github.io/simIDM/main/authors.html#citation).