-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvignette.Rmd
More file actions
182 lines (133 loc) · 6.42 KB
/
vignette.Rmd
File metadata and controls
182 lines (133 loc) · 6.42 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
---
title: "Case studies with CompAREdesign"
author: "Marta Bofill Roig, Jordi Cortés Martínez and Guadalupe Gómez Melis"
date: "`r Sys.Date()`"
output:
pdf_document: default
html_document: default
---
```{r setup, include=FALSE, echo=FALSE}
library('CompAREdesign') # Load library
knitr::opts_chunk$set(echo = TRUE) # Show code
```
## Introduction
This vignette presents two examples of application of the R package [CompAREdesign](https://CRAN.R-project.org/package=CompAREdesign) for the design of clinical trials with composite endpoints:
- First example: **time-to-event** endpoints
- Second example: **binary** endpoints
## Time-to-event endpoint: ZODIAC TRIAL
This example is based on the data from the [ZODIAC trial](https://doi.org/10.1016/S1470-2045(10)70132-7) [1].
### Input Parameters
First of all, the information for the components of the composite endpoint should be defined.
```{r}
## Probabilities of observing the event in control arm during follow-up
p0_e1 <- 0.59 # Death
p0_e2 <- 0.74 # Disease Progression
## Effect size (Cause specific hazard ratios) for each endpoint
HR_e1 <- 0.91 # Death
HR_e2 <- 0.77 # Disease Progression
## Hazard rates over time
beta_e1 <- 2 # Death --> Increasing risk over time
beta_e2 <- 1 # Disease Progression --> Constant risk over time
## Correlation
rho <- 0.1 # Correlation between components
rho_type <- 'Spearman' # Type of correlation measure
copula <- 'Frank' # Copula used to get the joint distribution
## Additional parameter
case <- 3 # 1: No deaths; 2: Death is the secondary event;
# 3: Death is the primary event; 4: Both events are death by different causes
```
### ARE: Asymptotic Relatively Efficiency
As the ARE is greater than 1, the design using the composite endpoint as the primary endpoint is more efficient from the statistical point of view.
```{r}
ARE_tte(p0_e1 = p0_e1 , p0_e2 = p0_e2,
HR_e1 = HR_e1 , HR_e2 = HR_e2,
beta_e1 = beta_e1 , beta_e2 = beta_e2,
rho = rho , rho_type = rho_type,
copula = copula , case = case)
```
### Effect size of the Composite Endpoint
Several summary measures of the treatment effect are provided.
```{r}
effectsize_tte(p0_e1 = p0_e1 , p0_e2 = p0_e2,
HR_e1 = HR_e1 , HR_e2 = HR_e2,
beta_e1 = beta_e1 , beta_e2 = beta_e2,
rho = rho , rho_type = rho_type,
copula = copula , case = case)
```
### Sample size
The required number of patients for the design of the trial using the composite endpoint as the primary endpoint is **1118**.
```{r}
samplesize_tte(p0_e1 = p0_e1 , p0_e2 = p0_e2,
HR_e1 = HR_e1 , HR_e2 = HR_e2,
beta_e1 = beta_e1 , beta_e2 = beta_e2,
rho = rho , rho_type = rho_type,
copula = copula , case = case,
alpha = 0.025 , power = 0.90,
ss_formula = 'schoenfeld')
```
### Influence of hazards rates over time on the effect size
The influence of the behaviour of the hazard rates over time on the treatment effect
can be studied by the function `effectsize_tte`.
```{r}
## Hazard rates over time Case 1
beta_e1 <- 1 # Death --> constant over time
beta_e2 <- 2 # Disease Progression --> increase over time
effectsize_tte(p0_e1 = p0_e1 , p0_e2 = p0_e2,
HR_e1 = HR_e1 , HR_e2 = HR_e2,
beta_e1 = beta_e1 , beta_e2 = beta_e2,
rho = rho , rho_type = rho_type,
copula = copula , case = case)
## Hazard rates over time Case 2
beta_e1 <- 1 # Death --> constant over time
beta_e2 <- 1 # Disease Progression --> constant over time
effectsize_tte(p0_e1 = p0_e1 , p0_e2 = p0_e2,
HR_e1 = HR_e1 , HR_e2 = HR_e2,
beta_e1 = beta_e1 , beta_e2 = beta_e2,
rho = rho , rho_type = rho_type,
copula = copula , case = case)
```
## Binary endpoint: TUXEDO TRIAL
This example is based on the data from the [TUXEDO trial](https://doi.org/10.1056/nejmoa1510188) [2].
### Input Parameters
First of all, the information for the components of the composite endpoint should be defined.
```{r}
## Probabilities of observing the event in control arm at the end of follow-up
p0_e1 <- 0.059 # Ischemia-driven target-lesion revascularization
p0_e2 <- 0.032 # Cardiac death or target-vessel MI
## Effect size (absolute reduction) for each endpoint
AR_e1 <- -0.0196 # Ischemia-driven target-lesion revascularization
AR_e2 <- -0.0098 # Cardiac death or target-vessel MI
## Correlation
rho <- 0.4
```
### ARE: Asymptotic Relatively Efficiency
As the ARE is greater than 1, we can state that the design using the composite endpoint is more efficient.
```{r}
ARE_cbe(p0_e1 = p0_e1 , p0_e2 = p0_e2,
eff_e1 = AR_e1 , eff_e2 = AR_e2,
effm_e1 = "diff" , effm_e2 = "diff", effm_ce = "or",
rho = rho)
```
### Effect size of the Composite Endpoint
We can obtain the expected treatment effect based on the odds ratio (*OR*).
```{r}
effectsize_cbe(p0_e1 = p0_e1 , p0_e2 = p0_e2,
eff_e1 = AR_e1 , eff_e2 = AR_e2,
effm_e1 = "diff" , effm_e2 = "diff", effm_ce = "or",
rho = rho)
```
### Sample size
The required sample size for the design usign the composite endpoint is **2644**.
```{r}
samplesize_cbe(p0_e1 = p0_e1 , p0_e2 = p0_e2,
eff_e1 = AR_e1 , eff_e2 = AR_e2,
effm_e1 = "diff" , effm_e2 = "diff", effm_ce = "or",
rho = rho,
alpha = 0.05, beta = 0.2)
```
## References
1. Herbst RS, Sun Y, Eberhardt WEE, Germonpré P, Saijo N, Zhou C et al. Vandetanib plus docetaxel versus docetaxel as second-line treatment for patients with advanced non-small-cell lung cancer (ZODIAC): a double-blind, randomised, phase 3 trial. Lancet Oncol. 2010;11(7):619–26.
2. Kaul U, Bangalore S, Seth A, Priyadarshini A, Rajpal KA, Tejas MP et al. Paclitaxel-Eluting versus EverolimusEluting Coronary Stents in Diabetes. N Engl J Med. 2015;373(18):1709-19.
```{r, echo = FALSE}
rm(list = ls())
```