forked from Novartis/xgx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Oncology_Efficacy_Plots.html
1058 lines (926 loc) · 39.4 KB
/
Oncology_Efficacy_Plots.html
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name="author" content="Fariba Khanshan, Andrew Stein" />
<title>PD, Oncology, RECIST - continuous, binary and categorical endpoints</title>
<script src="site_libs/jquery-1.11.3/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="site_libs/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<script src="site_libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/html5shiv.min.js"></script>
<script src="site_libs/bootstrap-3.3.5/shim/respond.min.js"></script>
<script src="site_libs/jqueryui-1.11.4/jquery-ui.min.js"></script>
<link href="site_libs/tocify-1.9.1/jquery.tocify.css" rel="stylesheet" />
<script src="site_libs/tocify-1.9.1/jquery.tocify.js"></script>
<script src="site_libs/navigation-1.1/tabsets.js"></script>
<script src="site_libs/navigation-1.1/codefolding.js"></script>
<link href="site_libs/highlightjs-9.12.0/default.css" rel="stylesheet" />
<script src="site_libs/highlightjs-9.12.0/highlight.js"></script>
<style type="text/css">
.visible-sm-block {padding-top: 120px;}
.visible-md-block {padding-top: 60px;}
.visible-lg-block {padding-top: 0px;}
</style>
<span class=visible-sm-block> </span>
<span class=visible-md-block> </span>
<span class=visible-lg-block> </span>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre:not([class]) {
background-color: white;
}
</style>
<script type="text/javascript">
if (window.hljs) {
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
if (document.readyState && document.readyState === "complete") {
window.setTimeout(function() { hljs.initHighlighting(); }, 0);
}
}
</script>
<style type="text/css">
h1 {
font-size: 34px;
}
h1.title {
font-size: 38px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 12px;
}
.table th:not([align]) {
text-align: left;
}
</style>
<style type = "text/css">
.main-container {
max-width: 940px;
margin-left: auto;
margin-right: auto;
}
code {
color: inherit;
background-color: rgba(0, 0, 0, 0.04);
}
img {
max-width:100%;
}
.tabbed-pane {
padding-top: 12px;
}
.html-widget {
margin-bottom: 20px;
}
button.code-folding-btn:focus {
outline: none;
}
summary {
display: list-item;
}
</style>
<style type="text/css">
/* padding for bootstrap navbar */
body {
padding-top: 51px;
padding-bottom: 40px;
}
/* offset scroll position for anchor links (for fixed navbar) */
.section h1 {
padding-top: 56px;
margin-top: -56px;
}
.section h2 {
padding-top: 56px;
margin-top: -56px;
}
.section h3 {
padding-top: 56px;
margin-top: -56px;
}
.section h4 {
padding-top: 56px;
margin-top: -56px;
}
.section h5 {
padding-top: 56px;
margin-top: -56px;
}
.section h6 {
padding-top: 56px;
margin-top: -56px;
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu>.dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover>.dropdown-menu {
display: block;
}
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.dropdown-submenu:hover>a:after {
border-left-color: #ffffff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left>.dropdown-menu {
left: -100%;
margin-left: 10px;
border-radius: 6px 0 6px 6px;
}
</style>
<script>
// manage active state of menu based on current page
$(document).ready(function () {
// active menu anchor
href = window.location.pathname
href = href.substr(href.lastIndexOf('/') + 1)
if (href === "")
href = "index.html";
var menuAnchor = $('a[href="' + href + '"]');
// mark it active
menuAnchor.parent().addClass('active');
// if it's got a parent navbar menu mark it active as well
menuAnchor.closest('li.dropdown').addClass('active');
});
</script>
<!-- tabsets -->
<style type="text/css">
.tabset-dropdown > .nav-tabs {
display: inline-table;
max-height: 500px;
min-height: 44px;
overflow-y: auto;
background: white;
border: 1px solid #ddd;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs > li.active:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li.active:before {
content: "";
border: none;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open:before {
content: "";
font-family: 'Glyphicons Halflings';
display: inline-block;
padding: 10px;
border-right: 1px solid #ddd;
}
.tabset-dropdown > .nav-tabs > li.active {
display: block;
}
.tabset-dropdown > .nav-tabs > li > a,
.tabset-dropdown > .nav-tabs > li > a:focus,
.tabset-dropdown > .nav-tabs > li > a:hover {
border: none;
display: inline-block;
border-radius: 4px;
}
.tabset-dropdown > .nav-tabs.nav-tabs-open > li {
display: block;
float: none;
}
.tabset-dropdown > .nav-tabs > li {
display: none;
}
</style>
<!-- code folding -->
<style type="text/css">
.code-folding-btn { margin-bottom: 4px; }
</style>
<style type="text/css">
#TOC {
margin: 25px 0px 20px 0px;
}
@media (max-width: 768px) {
#TOC {
position: relative;
width: 100%;
}
}
.toc-content {
padding-left: 30px;
padding-right: 40px;
}
div.main-container {
max-width: 1200px;
}
div.tocify {
width: 20%;
max-width: 260px;
max-height: 85%;
}
@media (min-width: 768px) and (max-width: 991px) {
div.tocify {
width: 25%;
}
}
@media (max-width: 767px) {
div.tocify {
width: 100%;
max-width: none;
}
}
.tocify ul, .tocify li {
line-height: 20px;
}
.tocify-subheader .tocify-item {
font-size: 0.90em;
}
.tocify .list-group-item {
border-radius: 0px;
}
</style>
</head>
<body>
<div class="container-fluid main-container">
<!-- setup 3col/9col grid for toc_float and main content -->
<div class="row-fluid">
<div class="col-xs-12 col-sm-4 col-md-3">
<div id="TOC" class="tocify">
</div>
</div>
<div class="toc-content col-xs-12 col-sm-8 col-md-9">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">xGx</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="glyphicon glyphicon-home"></span>
</a>
</li>
<li>
<a href="GuidingPrinciples.html">Guiding Principles</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Data Checking
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="Datasets.html">Dataset Specifications</a>
</li>
<li>
<a href="PKPD_Datasets.html">Master PK/PD Datasets used in creating example plots</a>
</li>
<li>
<a href="Data_Checking.html">Data Checking</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Dose-PK/Exposure
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="Single_Ascending_Dose_PK.html">Single Ascending Dose - PK</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PK.html">Multiple Ascending Dose - PK</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PK_KeyPlots.html">Example using realistic data</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Dose-PD/Efficacy/Safety
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="Multiple_Ascending_Dose_PD_continuous.html">Continuous</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PD_binary.html">Binary Response</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PD_ordinal.html">Ordinal Response</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PD_count.html">Count Data</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PD_time_to_event.html">Time to Event</a>
</li>
<li>
<a href="Oncology_Efficacy_Plots.html">Oncology Efficacy Endpoints (RECIST)</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PD_real_example.html">PD/Efficacy Example using realistic data</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
PK-PD/Efficacy/Safety
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="Multiple_Ascending_Dose_PKPD_continuous.html">Continuous</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PKPD_binary.html">Binary Response</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PKPD_ordinal.html">Ordinal Response</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PKPD_count.html">Count Data</a>
</li>
<li>
<a href="Multiple_Ascending_Dose_PKPD_time_to_event.html">Time to Event</a>
</li>
<li>
<a href="Adverse_Events.html">Adverse Events</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
Resources
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="Resources/PKPD_Exploratory_Graphics_(xGx)_Cheat_Sheet.pdf">PKPD Cheat Sheet</a>
</li>
<li>
<a href="Resources/Graphics_Principles_Cheat_Sheet_v1.1.pdf">Graphics Principles Cheat Sheet</a>
</li>
<li>
<a href="Resources/FundamentalPK_AndyStein_Hackathon_2019.pptx">Fundamental PK Principles Introduction</a>
</li>
<li>
<a href="Resources/FundamentalPD_AndyStein_Hackathon_2019.pptx">Fundamental PD Principles Introduction</a>
</li>
<li>
<a href="Resources/Presentation_Checklist_v2.03.pdf">Presentation Checklist</a>
</li>
<li>
<a href="Resources/Uncertainty_Assessment_Pedigree_Table.pdf">Uncertainty Assessment - Pedigree Table</a>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
<style type="text/css">
.visible-sm-block {padding-top: 120px;}
.visible-md-block {padding-top: 60px;}
.visible-lg-block {padding-top: 0px;}
.navbar-image {width: 150px;}
.warning {
font-size: 200% ;
color: red;
padding-top: 200px;
}
}
@media (min-width: 992px) and (max-width: 1200px){
.navbar-image {width: 19%;}
.section h1 {
padding-top: 110px;
margin-top: -110px;
}
.section h2 {
padding-top: 110px;
margin-top: -110px;
}
.section h3 {
padding-top: 110px;
margin-top: -110px;
}
}
@media (min-width: 768px) and (max-width: 991px){
.navbar-image {width: 19%;}
.section h1 {
padding-top: 160px;
margin-top: -160px;
}
.section h2 {
padding-top: 160px;
margin-top: -160px;
}
.section h3 {
padding-top: 160px;
margin-top: -160px;
}
}
@media (max-width: 768px){
.navbar-image {width: 19%;}
}
</style>
<!--[if IE]>
<p/>
<p/>
<p class="warning"> Dear Internet Explorer user: Please ensure compatibility view settings are turned OFF in order to view this website propertly. For best results, use Chrome. <br/>
<p/>
<![endif]-->
<div class="fluid-row" id="header">
<div class="btn-group pull-right">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span>Code</span> <span class="caret"></span></button>
<ul class="dropdown-menu" style="min-width: 50px;">
<li><a id="rmd-show-all-code" href="#">Show All Code</a></li>
<li><a id="rmd-hide-all-code" href="#">Hide All Code</a></li>
</ul>
</div>
<h1 class="title toc-ignore">PD, Oncology, RECIST - continuous, binary and categorical endpoints</h1>
<h4 class="author">Fariba Khanshan, Andrew Stein</h4>
</div>
<div id="overview" class="section level2">
<h2>Overview</h2>
<p>The purpose of this document is to provide exploratory plots and R code for assessing dose-response and exposure-response using the RECIST (Response Evaluation Criteria In Solid Tumors) endpoint data. These plots provide insight into whether a dose-response relationship is observable. In Phase 1, often no dose-response relationship is observed due to high inter-subject variability. In that situation, we recommened that no longitudinal, NLME modeling be performed as it is unlikely to add much value. Furthermore, even if an exposure-response relationship is detected, it must be interpreted with extreme caution when it cannot be confirmed with simple explortaory graphics.</p>
<p>The plots presented here are based on blinded merged RECIST data (<a href="Data/Oncology_Efficacy_Data.csv">download dataset</a>) with nmpk and and dose history datasets (<a href="Data/Oncology_Efficacy_Dose.csv">download dataset</a>). Data specifications can be accessed on <a href="Datasets.html">Datasets</a> and Rmarkdown template to generate this page can be found on <a href="Rmarkdown/Oncology_Efficacy_Plots.Rmd">Rmarkdown-Template</a>.</p>
<p>Standard statistical plots for summarizing recist (e.g. Waterfall) are presented elsewhere.</p>
</div>
<div id="setup" class="section level2">
<h2>Setup</h2>
<pre class="r"><code>library(ggplot2)
library(dplyr)
library(tidyr)
library(gridExtra)
library(zoo)
library(xgxr)
#flag for labeling figures as draft
status = "DRAFT"
## ggplot settings
xgx_theme_set()</code></pre>
</div>
<div id="load-dataset" class="section level2">
<h2>Load Dataset</h2>
<pre class="r"><code>recist.data <- read.csv("../Data/Oncology_Efficacy_Data.csv")
dose_record <- read.csv("../Data/Oncology_Efficacy_Dose.csv")
recist.data$MONO_DOSE_label <- paste(recist.data$DOSE_ABC,"mg")
recist.data$COMBO_DOSE_label <- paste(recist.data$DOSE_DEF,"mg")
recist.data = recist.data %>%
arrange(MONO_DOSE_label,COMBO_DOSE_label) %>%
mutate(MONO_DOSE_label_low2high = factor(MONO_DOSE_label, levels = unique(MONO_DOSE_label)),
MONO_DOSE_label_high2low = factor(MONO_DOSE_label, levels = rev(unique(MONO_DOSE_label))),
COMBO_DOSE_label_low2high = factor(COMBO_DOSE_label, levels = unique(COMBO_DOSE_label)),
COMBO_DOSE_label_high2low = factor(COMBO_DOSE_label, levels = rev(unique(COMBO_DOSE_label))))
#ensure dataset has all the necessary columns
recist.data = recist.data %>%
mutate(IDSHORT = IDSHORT, #ID column
BOR = BOR, #Best Overal Response
BPCHG = BPCHG, #Best Percent Change from Baseline
OR = OR , #Overall Response
BORNUM = BORNUM, #Best Overall Response Value
psld = psld, #Percent Change in Sum of Longest Diameters
DOSE_ABC = DOSE_ABC, #Dose of Agent 1 (numeric)
DOSE_DEF = DOSE_DEF, #Dose of Agent 2 (numeric)
DOSE_combo = DOSE_combo, #ARM of the study (character)
binary_BOR = binary_BOR, #Binary Best Overall Response
PR_rate = PR_rate, #Partial Response rate
n = n, #The number of total subjects in each dose group
count_cr_pr = count_cr_pr, #Count the number of CR or PR subjects in each dose group
TIME = TIME, #Evaluation time
TIME_OR = TIME_OR, #Overall Response evaluation time
auc0_24 = auc0_24, #AUC-24
)
dose_record = dose_record %>%
mutate(IDSHORT = IDSHORT, #ID column
DOSE = DOSE, #Dose amount
TIME = TIME, #Dosing time
COMB = COMB, #Single agent or combo
)
# make single agent and combo datsets
recist.data.monotherapy = recist.data %>% filter(COMB=="Single")
recist.data.combo = recist.data %>% filter(COMB=="Combo")
# Dose record data preparation for making step function plot
# in order to show any dose reduction during the study
# the idea is that at each time point, you have both the current dose and the previous dose
# the dplyr::lag command implements this
data_areaStep <- bind_rows(old = dose_record,
new = dose_record %>%
group_by(IDSHORT) %>%
mutate(DOSE = lag(DOSE)),
.id = "source") %>%
arrange(IDSHORT, TIME, source) %>%
ungroup() %>%
mutate(DOSE = ifelse(lag(IDSHORT)!=IDSHORT, NA, DOSE),
TIME = TIME/24) #convert to days
data_areaStep.monotherapy = filter(data_areaStep,COMB=="Single")
# calculate average dose intensity up to the first assessment:
# "TIME==57"" is the first assessment time in this dataset
first.assess.time = 57
dose_record <- dose_record %>%
group_by(IDSHORT) %>%
mutate(ave_dose_intensity = mean(DOSE[TIME/24 < first.assess.time]))
dose_intensity <- dose_record[c("IDSHORT","COMB","ave_dose_intensity")]
dose_intensity <- subset(dose_intensity, !duplicated(IDSHORT))
#units and labels
time_units_dataset = "hours"
time_units_plot = "days"
trtact_label = "Dose"
dose_label = "Dose (mg)"
time_label = "Time(Days)"
timemonth_label = "Time (months)"
sld_label = "Percent Change in\nSum of Longest Diameters"
mono_dose_label = "ABC123 Dose (mg)"
combo_dose_label = "DEF456 Dose (mg)"
bpchg_label = "Best Percent Change \n in Tumor Size (%)"
mono_auc_label = "ABC123 AUC0-24 (ng.h/ml)"
mono_aveauc_label = "Average ABC123 dose (mg) \n up to the first assessment"
first_pchg_label = " Percent Change in Tumor Size \n up to the first assessment"
rr_label = "Response Rate (%)"
#directories for saving individual graphs
dirs = list(
parent_dir= tempdir(),
rscript_dir = "./",
rscript_name = "Example.R",
results_dir = "./",
filename_prefix = "",
filename = "Example.png")</code></pre>
</div>
<div id="introduction-to-recist" class="section level2">
<h2>Introduction to RECIST</h2>
<p>RECIST (Response Evaluation Criteria in Solid Tumor) uses an image-based assessment from X-ray Computed Tomography (CT) scans. and has three components:</p>
<ol style="list-style-type: decimal">
<li>Sum of the longest diameter of the target lesions (continuous measure),</li>
<li>Assessment of the non target lesions (categorical measure), and</li>
<li>Appearance of a new lesion (binary yes/no measure).</li>
</ol>
<p>An example patient and the criteria for assigning a response category, is shown below.</p>
<p><img src="SiteResources/RECIST.png" style="width:80.0%" /></p>
<div class="figure">
<img src="SiteResources/response_category.png" alt="Figure 1: Example RECIST assessment for individualpatient and response category identified" style="width:80.0%" />
<p class="caption">Figure 1: Example RECIST assessment for individualpatient and response category identified</p>
</div>
</div>
<div id="overview-of-all-data" class="section level2">
<h2>Overview of all data</h2>
<div id="spaghetti-plots-of-change-from-baseline" class="section level3">
<h3>Spaghetti plots of change from baseline</h3>
<p>We recommend stratifying the spaghetti plots of target lesion kinetics by dose so that one can observe if there is more tumor shrinkage at the higher dose groups. In this case, no obvious relationship is observed and it is likely a longitudinal model will not be helpful.</p>
<pre class="r"><code>gg <- ggplot(data= recist.data.monotherapy,aes(x=TIME, y=psld))
gg <- gg + geom_line(aes(group=IDSHORT, color =factor(MONO_DOSE_label_high2low)))
gg <- gg + geom_point(alpha=.3,colour="black")
gg <- gg + guides(color=guide_legend(""),fill=guide_legend(""))
gg <- gg + geom_hline(yintercept = 0.0, linetype="dashed")
gg <- gg + xgx_scale_x_time_units(units_dataset = "day", units_plot ="month")
gg <- gg + theme(text = element_text(size=15))
gg <- gg + labs(x= timemonth_label, y= sld_label)
gg <- gg + xgx_annotate_status(status)
gg</code></pre>
<p><img src="Oncology_Efficacy_Plots_files/figure-html/unnamed-chunk-3-1.png" width="768" /></p>
</div>
<div id="change-from-baseline-plot-faceted-by-dose" class="section level3">
<h3>Change from baseline plot, faceted by Dose</h3>
<pre class="r"><code>gg <- ggplot(data=recist.data.monotherapy,aes(x=TIME, y=psld))
gg <- gg + geom_line(aes(group=IDSHORT))
gg <- gg + geom_point(alpha=.3,colour="black")
gg <- gg + guides(color=guide_legend(""),fill=guide_legend(""))
gg <- gg + facet_grid(~MONO_DOSE_label)
gg <- gg + geom_hline(yintercept = 0.0, linetype="dashed")
gg <- gg + theme(text = element_text(size=15))
gg <- gg + xgx_scale_x_time_units(units_dataset = "day", units_plot ="month")
gg <- gg + labs(x= timemonth_label, y= sld_label)
gg <- gg + xgx_annotate_status(status)
gg</code></pre>
<p><img src="Oncology_Efficacy_Plots_files/figure-html/unnamed-chunk-4-1.png" width="960" /></p>
</div>
<div id="individual-plots-of-percent-change-from-baseline-including-dosing-history-labeled-by-overall-response" class="section level3">
<h3>Individual plots of percent change from baseline, including dosing history, labeled by “Overall Response”</h3>
<p>These plots allow one to look for subtle trends in the individual trajectories. If changes in the tumor trajectory occur often after a dose reduction, a longitudinal model may be useful for assessing dose-response. However, caution is needed because both dose reductions and resistance acquisition can occur at later times and it may not be easy to deterimne which is the cause of the change in tumor trajectory.</p>
<p>In the first plot below, it is difficult to see a trend of dose changes impacting response and a longitudinal tumor-size model will likely not be informative. But in the second plot below, a trend of tumor shrinkage followed by tumor growth after a dose reduction was observed and a longitudinal model was useful for characterizing this data. <a href="https://bmccancer.biomedcentral.com/articles/10.1186/1471-2407-12-311">see reference</a></p>
<p>Example 1, longitudinal model won’t be informative:</p>
<pre class="r"><code># This part is optional to label "OR" in the plot
# "OR" can be substituted with other information, such as non-target, new target lesions
# make the OR label for the plot
recist.data.label <- recist.data %>%
group_by(IDSHORT) %>%
mutate(label_psld = as.numeric(ifelse(TIME==TIME_OR , psld,""))) %>%
filter(!(is.na(label_psld) | label_psld==""))
dose_shift = 50
dose_scale = 1.2
data_areaStep.monotherapy = data_areaStep.monotherapy %>%
mutate(dose_shift = DOSE/dose_scale+dose_shift)
dose_unique = c(0,unique(recist.data.monotherapy$DOSE_ABC))
data_tumor = recist.data.monotherapy
data_dose_step = data_areaStep.monotherapy
gg <- ggplot(data = data_tumor)
gg <- gg + geom_point(mapping = aes(y= psld, x= TIME))
gg <- gg + geom_text(data= recist.data.label,aes(y= label_psld, x= TIME_OR, label=OR), vjust=-.5)
gg <- gg + geom_hline(aes(yintercept = 0),size=0.25,linetype="dashed", colour="red")
gg <- gg + geom_line(mapping = aes(y= psld, x= TIME))
gg <- gg + geom_ribbon(data = data_dose_step,
aes( ymin = 50, ymax = dose_shift , x= TIME),
fill="palegreen2", color = "black", alpha=0.5 )
gg <- gg + facet_wrap(~IDSHORT, ncol = 6)
gg <- gg + labs(y = sld_label, x= timemonth_label)
gg <- gg + xgx_scale_x_time_units(units_dataset = "day", units_plot ="month")
gg <- gg + scale_y_continuous(
sec.axis = sec_axis(~(.-dose_shift)*dose_scale, name = "Dose(mg)", breaks = dose_unique))
gg <- gg + theme(text = element_text(size=15))
gg <- gg + xgx_annotate_status(status)
gg</code></pre>
<p><img src="Oncology_Efficacy_Plots_files/figure-html/unnamed-chunk-5-1.png" width="960" /></p>
<p>Example 2, dose reduction was followed by growth of tumor and longitudinal model would help.</p>
<div class="figure">
<img src="SiteResources/Stein12_RAD001.png" alt="Example data where dose reduction was followed by growth of tumor" style="width:100.0%" />
<p class="caption">Example data where dose reduction was followed by growth of tumor</p>
</div>
</div>
</div>
<div id="dose-response-monotherapy" class="section level2">
<h2>Dose-Response: Monotherapy</h2>
<p>To visualize dose-response (exposure-response), we recommend plotting the assigned dose group (or exposure) vs best overall change in tumor size.</p>
<p><strong>Warning:</strong> If you see what appears to be a linear dose-response relationship (e.g. more tumor shrinkage with increasing dose), be very cautious when trying to extrapolate outside this range, as Emax may not have been observed yet.</p>
<pre class="r"><code>gg <- ggplot()
gg <- gg + geom_point(data=recist.data.monotherapy,aes(x=DOSE_ABC,y=BPCHG),color="tomato")
gg <- gg + scale_x_continuous(breaks=unique(recist.data.monotherapy$DOSE_ABC))
gg <- gg + geom_hline(yintercept=0,color="grey50", linetype = "dashed")
gg <- gg + scale_y_continuous(labels=scales::percent)
gg <- gg + labs(x=mono_dose_label, y=bpchg_label)
gg <- gg + theme(legend.title=element_blank())
gg <- gg + theme(text = element_text(size=15))
gg <- gg + xgx_annotate_status(status)
gg</code></pre>
<p><img src="Oncology_Efficacy_Plots_files/figure-html/unnamed-chunk-6-1.png" width="768" /></p>
<pre class="r"><code>gg <- ggplot()
gg <- gg + geom_point(data=recist.data.monotherapy,aes(x=auc0_24,y=BPCHG), color="tomato")
gg <- gg + geom_hline(yintercept=0,color="grey50", linetype = "dashed")
gg <- gg + scale_y_continuous(labels=scales::percent)
gg <- gg + labs(x=mono_auc_label, y=bpchg_label)
gg <- gg + theme(legend.title=element_blank())
gg <- gg + theme(text = element_text(size=15))
gg <- gg + xgx_annotate_status(status)
gg</code></pre>
<p><img src="Oncology_Efficacy_Plots_files/figure-html/unnamed-chunk-7-1.png" width="768" /></p>
<p>Best overall change is commonly reported in Waterfall plots. And the reason we recommend using the randomized dose group as opposed to something like average dose-intensity is that the latter can be confounded. For instance, consider the following scenario. There are two patients that both start at 10 mg. One has 30% tumor growth at the first assessment and progresses. The other responds, but at month 6, they are dose reduced to 5 mg due to an adverse event, and then followed for another 6 months. In this case, the responder would have a dose intensity of 7.5 mg while the non-responder had a dose-intensity of 10 mg, and thus one might conclude from a simple plot of these two patients that lower doses are better.</p>
<p>One way to avoid this issue is to plot average dose intensity up to the first assessment vs percent change at the first assessment and this could be considered if there are a large number of dose reductions before the first assessment.</p>
<pre class="r"><code># Do it only for monoteraphy, it can be repeated for combo
dose_intensity <- dose_intensity[dose_intensity$COMB=="Single",]
recist.data.assessment <- recist.data.monotherapy %>%
merge(dose_intensity ,by="IDSHORT")
gg <- ggplot()
gg <- gg + geom_point(data=recist.data.assessment %>% subset(TIME==first.assess.time,),
aes(x=ave_dose_intensity ,
y=psld),color="tomato")
gg <- gg + scale_x_continuous(breaks=c(20,40, 60, 74,78,90))
gg <- gg + geom_hline(yintercept=0,color="grey50", linetype = "dashed")
gg <- gg + labs(x=mono_aveauc_label, y= first_pchg_label)
gg <- gg + theme(legend.title=element_blank())
gg <- gg + theme(text = element_text(size=15))
gg <- gg + xgx_annotate_status(status)
gg</code></pre>
<p><img src="Oncology_Efficacy_Plots_files/figure-html/unnamed-chunk-8-1.png" width="768" /></p>
</div>
<div id="dose-response-combo" class="section level2">
<h2>Dose-Response: Combo</h2>
<p>When two drugs are combined (ABC123 + DEF456), it can be a useful first step to look at the dose-response relationship of each drug. However, it should be noted that provide only a limited understanding of the data.</p>
<pre class="r"><code>gg <- ggplot()
gg <- gg + geom_point(data=recist.data.combo,aes(x=DOSE_ABC,y=BPCHG,
color = paste0("ABC123 + ", COMBO_DOSE_label_high2low, " DEF456")))
gg <- gg + geom_point(data=recist.data.monotherapy,aes(x=DOSE_ABC,y=BPCHG, color="ABC123"))
gg <- gg + labs(color = "DEF456 (mg) dose:")
gg <- gg + geom_hline(yintercept=0,color="grey50", linetype = "dashed")
gg <- gg + scale_x_continuous(breaks=unique(recist.data.monotherapy$DOSE_ABC))
gg <- gg + labs(x=mono_dose_label,y=bpchg_label)
gg <- gg + scale_y_continuous(labels=scales::percent)
gg <- gg + theme(text = element_text(size=15))
gg <- gg + xgx_annotate_status(status)
gg</code></pre>
<p><img src="Oncology_Efficacy_Plots_files/figure-html/unnamed-chunk-9-1.png" width="960" /></p>
<pre class="r"><code>gg <- ggplot(data=recist.data.combo,aes(x=DOSE_DEF,y=BPCHG))
gg <- gg + geom_point(aes( color= paste0("+ ", MONO_DOSE_label_low2high, " ABC123")))
gg <- gg + geom_hline(yintercept=0,color="grey50", linetype = "dashed")
gg <- gg + scale_x_continuous(breaks=unique(recist.data.combo$DOSE_DEF))
gg <- gg + labs(x=combo_dose_label,y=bpchg_label)
gg <- gg + scale_y_continuous(labels=scales::percent)
gg <- gg + theme(legend.title=element_blank())
gg <- gg + theme(text = element_text(size=15))
gg <- gg + xgx_annotate_status(status)
gg</code></pre>
<p><img src="Oncology_Efficacy_Plots_files/figure-html/unnamed-chunk-10-1.png" width="960" /></p>
<div id="responder-rate-95-ci-vs-dose" class="section level3">
<h3>Responder rate (95% CI) vs dose</h3>
<p>For most of the oncology clinical trials, the standard primary and secondary endpoints are Overall Survival (OS), Progression Free Survival (PFS), duration without progression (PD) or death, and Overall Response Rate (ORR). Dose vs ORR at each dose can be informative.</p>
<pre class="r"><code>gg <- ggplot(data = recist.data.combo, aes(x=DOSE_ABC,y=PR_rate))
gg <- gg + xgx_stat_ci(mapping = aes(x = DOSE_ABC, y = binary_BOR ,group=DOSE_ABC),
conf_level = 0.95, distribution = "binomial", geom = c("point"), size = 4, color="tomato")
gg <- gg + xgx_stat_ci(mapping = aes(x = DOSE_ABC, y = binary_BOR , group=DOSE_ABC),
conf_level = 0.95, distribution = "binomial", geom = c("errorbar"), size = 0.5)
gg <- gg + scale_x_continuous(breaks=unique(recist.data[recist.data$COMB=="Combo",]$DOSE_ABC))
gg <- gg + scale_y_continuous(labels=scales::percent)
gg <- gg + labs(x= mono_dose_label, y= rr_label)
gg <- gg + theme(text = element_text(size=15))
gg <- gg + xgx_annotate_status(status)
gg</code></pre>
<p><img src="Oncology_Efficacy_Plots_files/figure-html/unnamed-chunk-11-1.png" width="768" /></p>
</div>
<div id="best-overall-response-bor-plot-for-combo-therapy" class="section level3">
<h3>Best Overall Response (BOR) plot for combo therapy</h3>
<pre class="r"><code>gg <- ggplot(data=recist.data.combo,aes(x=DOSE_ABC ,y=DOSE_DEF,fill=PR_rate))
gg <- gg + scale_fill_gradient(low="orange", high="green")
gg <- gg + geom_segment(data=recist.data.combo, aes(x=-Inf,xend=20,y=30,yend=30), color=rgb(0.5,0.5,0.5))
gg <- gg + geom_segment(data=recist.data.combo, aes(x=20,xend=20,y=-Inf,yend=30), color=rgb(0.5,0.5,0.5))
gg <- gg + geom_segment(data=recist.data.combo, aes(x=-Inf,xend=40,y=30,yend=30), color=rgb(0.5,0.5,0.5))
gg <- gg + geom_segment(data=recist.data.combo, aes(x=40,xend=40,y=-Inf,yend=30), color=rgb(0.5,0.5,0.5))
gg <- gg + geom_segment(data=recist.data.combo, aes(x=-Inf,xend=60,y=30,yend=30), color=rgb(0.5,0.5,0.5))
gg <- gg + geom_segment(data=recist.data.combo, aes(x=60,xend=60,y=-Inf,yend=30), color=rgb(0.5,0.5,0.5))
gg <- gg + geom_segment(data=recist.data.combo, aes(x=-Inf,xend=40,y=40,yend=40), color=rgb(0.5,0.5,0.5))
gg <- gg + geom_segment(data=recist.data.combo, aes(x=40,xend=40,y=-Inf,yend=40), color=rgb(0.5,0.5,0.5))
gg <- gg + geom_label(data=unique(recist.data.combo[,c("DOSE_DEF","DOSE_ABC","PR_rate","n","count_cr_pr")]),
aes(x=DOSE_ABC ,y=DOSE_DEF*1.00,fontface=2, label=paste0(round(PR_rate,2)*100,
"% ORR \nn=",n,"\nn(CR|PR)=",count_cr_pr)))
gg <- gg + scale_x_continuous(breaks=c(20, 40, 60))
gg <- gg + scale_y_continuous(breaks=c(30, 40))
gg <- gg + labs(x=mono_dose_label , y= combo_dose_label)
gg <- gg + theme(legend.title = element_blank(),
plot.title=element_text(hjust=0.5),
text = element_text(size=20),
title = element_text(size=20))
gg <- gg + guides(fill=FALSE)
gg <- gg + xgx_annotate_status(status)
gg </code></pre>
<p><img src="Oncology_Efficacy_Plots_files/figure-html/unnamed-chunk-12-1.png" width="1344" /></p>
</div>
</div>
<div id="r-session-info" class="section level2">
<h2>R Session Info</h2>
<pre class="r"><code>sessionInfo()</code></pre>
<pre><code>## R version 3.6.1 (2019-07-05)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Red Hat Enterprise Linux
##
## Matrix products: default
## BLAS/LAPACK: /CHBS/apps/EB/software/imkl/2019.1.144-gompi-2019a/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64_lin/libmkl_gf_lp64.so
##
## Random number generation:
## RNG: Mersenne-Twister
## Normal: Inversion
## Sample: Rounding
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] grid stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] stringr_1.4.0 survminer_0.4.6 ggpubr_0.2.3 magrittr_1.5
## [5] survival_3.1-7 knitr_1.25 broom_0.5.3 DT_0.9
## [9] caTools_1.17.1.2 RxODE_0.9.1-8 zoo_1.8-6 xgxr_1.0.7
## [13] gridExtra_2.3 tidyr_1.0.0 dplyr_0.8.3 ggplot2_3.2.1
##
## loaded via a namespace (and not attached):
## [1] nlme_3.1-142 bitops_1.0-6 matrixStats_0.55.0
## [4] lubridate_1.7.4 RColorBrewer_1.1-2 rstan_2.19.2
## [7] tools_3.6.1 backports_1.1.5 R6_2.4.0
## [10] lazyeval_0.2.2 colorspace_1.4-1 lotri_0.1.1
## [13] withr_2.1.2 tidyselect_0.2.5 prettyunits_1.0.2
## [16] processx_3.4.1 compiler_3.6.1 cli_1.1.0
## [19] binom_1.1-1 labeling_0.3 scales_1.0.0
## [22] survMisc_0.5.5 callr_3.3.2 mvnfast_0.2.5
## [25] digest_0.6.22 StanHeaders_2.19.0 rmarkdown_1.16
## [28] PreciseSums_0.3 pkgconfig_2.0.3 htmltools_0.4.0
## [31] highr_0.8 fastmap_1.0.1 htmlwidgets_1.5.1
## [34] rlang_0.4.1 rstudioapi_0.10 shiny_1.4.0
## [37] farver_1.1.0 generics_0.0.2 jsonlite_1.6
## [40] crosstalk_1.0.0 inline_0.3.15 loo_2.1.0
## [43] Matrix_1.2-17 Rcpp_1.0.3 munsell_0.5.0
## [46] lifecycle_0.1.0 stringi_1.4.3 yaml_2.2.0
## [49] MASS_7.3-51.4 pkgbuild_1.0.6 plyr_1.8.4
## [52] parallel_3.6.1 promises_1.1.0 crayon_1.3.4
## [55] lattice_0.20-38 splines_3.6.1 pander_0.6.3
## [58] zeallot_0.1.0 ps_1.3.0 pillar_1.4.2
## [61] markdown_1.1 ggsignif_0.6.0 reshape2_1.4.3
## [64] codetools_0.2-16 stats4_3.6.1 glue_1.3.1
## [67] evaluate_0.14 data.table_1.12.6 png_0.1-7
## [70] vctrs_0.2.0 tweenr_1.0.1 httpuv_1.5.2
## [73] gtable_0.3.0 purrr_0.3.3 polyclip_1.10-0
## [76] km.ci_0.5-2 assertthat_0.2.1 xfun_0.10
## [79] ggforce_0.3.1 mime_0.7 xtable_1.8-4
## [82] later_1.0.0 rsconnect_0.8.15 tibble_2.1.3
## [85] KMsurv_0.1-5 memoise_1.1.0 units_0.6-5
## [88] ellipsis_0.3.0</code></pre>
</div>
</div>
</div>
</div>
<script>
// add bootstrap table styles to pandoc tables
function bootstrapStylePandocTables() {
$('tr.header').parent('thead').parent('table').addClass('table table-condensed');
}
$(document).ready(function () {
bootstrapStylePandocTables();
});
</script>
<!-- tabsets -->