-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
146 lines (109 loc) · 4.82 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
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
```{r, echo = F}
suppressPackageStartupMessages(library(ph2rand))
```
# ph2rand <img src='man/figures/ph2rand.png' align="right" height="139" />
*Randomized Phase II Oncology Trials with Bernoulli Outcomes*
## Description
__ph2rand__ provides functions to assist with the design of randomized comparative phase II oncology trials that assume their primary outcome variable is Bernoulli distributed.
Specifically, support is provided to (a) perform a sample size calculation when using one of several published designs (Jung, 2008; Jung and Sargent, 2014; Kepner, 2010; Litwin *et al*, 2017, Shan *et al*, 2013), (b) evaluate the operating characteristics of a given design (both analytically and via simulation), and (c) produce informative plots.
## Getting started
You can install the the latest development version of __ph2rand__, available from [GitHub](https://github.com/), with
```{r, eval = F}
devtools::install_github("mjg211/ph2rand")
```
An introductory example of how to make use of the package’s core functionality can be found below.
For further help, please see the package vignettes or email michael.grayling@newcastle.ac.uk.
## Example: Two-stage designs
We demonstrate functionality for two-stage designs, with the approach for single-stage designs being similar.
First, find a two-stage design from Jung (2008) for the default parameters
```{r binomial}
des_jung <- des_two_stage()
```
Then examine its required sample size in each arm, in each stage
```{r binomial_samplesize}
des_jung$nC
des_jung$nE
```
Next, look at its key operating characteristics
```{r binomial_opchar}
des_jung$opchar
```
Compare this to the equivalent design from Litwin *et al* (2017)
```{r sat}
des_litwin_et_al <- des_two_stage(type = "sat",
nCmax = 20L)
des_litwin_et_al$nC
des_litwin_et_al$nE
des_litwin_et_al$opchar
```
Now to that from Shan (2013)
```{r barnard}
des_shan_et_al <- des_two_stage(type = "barnard",
nCmax = 40L)
des_shan_et_al$nC
des_shan_et_al$nE
des_shan_et_al$opchar
```
And finally that from Jung and Sargent (2014)
```{r fisher}
des_jung_sargent <- des_two_stage(type = "fisher")
des_jung_sargent$nC
des_jung_sargent$nE
des_jung_sargent$opchar
```
We can then readily find the terminal points of any of these designs, along with their probability mass functions and operating characteristics for any true response rates.
For example, consider two scenarios given by
```{r pi}
pi <- rbind(c(0.1, 0.1),
c(0.1, 0.3))
```
Then find the terminal points, probability mass functions, and operating characteristics (both analytically and via simulation) of the Jung (2008) design with
```{r terminal_pmf_opchar}
terminal_jung <- terminal(des_jung)
terminal_jung$terminal
pmf_jung <- pmf(des_jung, pi)
pmf_jung$pmf
opchar_jung <- opchar(des_jung, pi)
opchar_jung$opchar
sim_jung <- sim(des_jung, pi)
sim_jung$sim
```
Finally, we can plot various factors relating to the designs.
For example, plot the terminal points of the Jung (2008) design (with their associated decisions), along with the probability of rejecting the null hypothesis when the response probabilities are equal in the two arms or when the difference in the response probabilities is the chosen treatment effect
```{r plot}
plot(des_jung)
```
See the package vignettes for further details.
## References
Jung SH (2008) Randomized phase II trials with a prospective control.
*Stat Med* 27(4):568--83.
DOI: [10.1002/sim.2961](https://doi.org/10.1002/sim.2961).
PMID: [17573688](https://pubmed.ncbi.nlm.nih.gov/17573688).
Jung SH, Sargent DJ (2014) Randomized phase II clinical trials.
*J Biopharm Stat* 24(4):802--16.
DOI: [10.1080/10543406.2014.901343](https://doi.org/10.1080/10543406.2014.901343).
PMID: [24697589](https://pubmed.ncbi.nlm.nih.gov/24697589).
Kepner JL (2010) On group sequential designs comparing two binomial proportions.
*J Biopharm Stat* 20(1):145--59.
DOI: [10.1080/10543400903280621](https://doi.org/10.1080/10543400903280621).
PMID: [20077254](https://pubmed.ncbi.nlm.nih.gov/20077254).
Litwin S, Basickes S, Ross EA (2017) Two-sample binary phase 2 trials with low type I error and low sample size.
*Stat Med* 36(9):1383--94.
DOI: [10.1002/sim.7226](https://doi.org/10.1002/sim.7226).
PMID: [28118686](https://pubmed.ncbi.nlm.nih.gov/28118686).
Shan G, Ma C, Hutson AD, Wilding GE (2013) Randomized two-stage phase II clinical trial designs based on Barnard's exact test.
*J Biopharm Stat* 23(5):1081--90.
DOI: [10.1080/10543406.2013.813525](https://doi.org/10.1080/10543406.2013.813525).
PMID: [23957517](https://pubmed.ncbi.nlm.nih.gov/23957517).