From 7b7251523131514abce593e3a91ae10bf5ee39d1 Mon Sep 17 00:00:00 2001 From: wanjau_merck Date: Thu, 3 Oct 2024 11:12:44 -0400 Subject: [PATCH 1/2] as_rtf snapshot tests --- .../independent-as_rtf/gsBinomialExact.rtf | 134 +++++++++++ .../gsBinomialExact_safety.rtf | 124 +++++++++++ .../independent-as_rtf/gsBoundSummary.rtf | 209 ++++++++++++++++++ .../gsBoundSummary_basic.rtf | 209 ++++++++++++++++++ .../gsBoundSummary_design.rtf | 209 ++++++++++++++++++ .../gsBoundSummary_footnote.rtf | 199 +++++++++++++++++ tests/testthat/test-independent-as_rtf.R | 123 +++++++++++ 7 files changed, 1207 insertions(+) create mode 100644 tests/testthat/_snaps/independent-as_rtf/gsBinomialExact.rtf create mode 100644 tests/testthat/_snaps/independent-as_rtf/gsBinomialExact_safety.rtf create mode 100644 tests/testthat/_snaps/independent-as_rtf/gsBoundSummary.rtf create mode 100644 tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_basic.rtf create mode 100644 tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_design.rtf create mode 100644 tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_footnote.rtf create mode 100644 tests/testthat/test-independent-as_rtf.R diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBinomialExact.rtf b/tests/testthat/_snaps/independent-as_rtf/gsBinomialExact.rtf new file mode 100644 index 00000000..ebde3217 --- /dev/null +++ b/tests/testthat/_snaps/independent-as_rtf/gsBinomialExact.rtf @@ -0,0 +1,134 @@ +{\rtf1\ansi +\deff0\deflang1033 +{\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} +{\f1\froman\fcharset161\fprq2 Times New Roman Greek;} +{\f2\fswiss\fcharset161\fprq2 Arial Greek;} +{\f3\fswiss\fcharset161\fprq2 Arial;} +{\f4\fswiss\fcharset161\fprq2 Helvetica;} +{\f5\fswiss\fcharset161\fprq2 Calibri;} +{\f6\froman\fcharset161\fprq2 Georgia;} +{\f7\ffroman\fcharset161\fprq2 Cambria;} +{\f8\fmodern\fcharset161\fprq2 Courier New;} +{\f9\ftech\fcharset161\fprq2 Symbol;} +} + + +\paperw12240\paperh15840 + +\margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 + +{\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Power/Type I Error and Expected Sample Size for a Group Sequential Design}\par} + + +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Underlying Response Rate}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Probability of Crossing}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Expected Sample Sizes}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx4500 +\clbrdrl\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Futility Bound}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Efficacy Bound}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 10%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.00}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.00}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 34.9}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 20%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.90}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.10}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 34.0}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 30%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.51}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.49}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 28.2}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 40%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.12}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.88}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 20.4}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 50%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.01}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.99}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 15.0}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 60%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.00}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.00}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 12.8}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 70%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.00}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.00}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 12.1}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 80%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.00}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.00}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 12.0}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 90%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.00}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.00}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 12.0}\cell +\intbl\row\pard + + + +} diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBinomialExact_safety.rtf b/tests/testthat/_snaps/independent-as_rtf/gsBinomialExact_safety.rtf new file mode 100644 index 00000000..6e1032a9 --- /dev/null +++ b/tests/testthat/_snaps/independent-as_rtf/gsBinomialExact_safety.rtf @@ -0,0 +1,124 @@ +{\rtf1\ansi +\deff0\deflang1033 +{\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} +{\f1\froman\fcharset161\fprq2 Times New Roman Greek;} +{\f2\fswiss\fcharset161\fprq2 Arial Greek;} +{\f3\fswiss\fcharset161\fprq2 Arial;} +{\f4\fswiss\fcharset161\fprq2 Helvetica;} +{\f5\fswiss\fcharset161\fprq2 Calibri;} +{\f6\froman\fcharset161\fprq2 Georgia;} +{\f7\ffroman\fcharset161\fprq2 Cambria;} +{\f8\fmodern\fcharset161\fprq2 Courier New;} +{\f9\ftech\fcharset161\fprq2 Symbol;} +} + + +\paperw12240\paperh15840 + +\margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 + +{\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Operating Characteristics by Underlying Response Rate for Exact Binomial Group Sequential Design}\par} + + +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Underlying\line AE Rate}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Probability of Crossing}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Expected Sample Sizes}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx4500 +\clbrdrl\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Low Rate}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 High Rate}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.964}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.001}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 34.8}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 4%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.769}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.019}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 46.4}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 6%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.506}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.108}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 54.3}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 8%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.291}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.290}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 56.1}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 10%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.155}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.516}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 52.8}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 12%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.079}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.714}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 46.8}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 14%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.039}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.851}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 40.2}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx2250 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx4500 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx6750 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 16%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.020}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.930}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 34.2}\cell +\intbl\row\pard + + + +} diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary.rtf b/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary.rtf new file mode 100644 index 00000000..04c1589e --- /dev/null +++ b/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary.rtf @@ -0,0 +1,209 @@ +{\rtf1\ansi +\deff0\deflang1033 +{\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} +{\f1\froman\fcharset161\fprq2 Times New Roman Greek;} +{\f2\fswiss\fcharset161\fprq2 Arial Greek;} +{\f3\fswiss\fcharset161\fprq2 Arial;} +{\f4\fswiss\fcharset161\fprq2 Helvetica;} +{\f5\fswiss\fcharset161\fprq2 Calibri;} +{\f6\froman\fcharset161\fprq2 Georgia;} +{\f7\ffroman\fcharset161\fprq2 Cambria;} +{\f8\fmodern\fcharset161\fprq2 Courier New;} +{\f9\ftech\fcharset161\fprq2 Symbol;} +} + + +\paperw12240\paperh15840 + +\margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 + +{\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Boundary Characteristics for Group Sequential Design}\par} + + +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Analysis}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Value}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Efficacy}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Futility}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 IA 1: 33%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3.0107}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.2388}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 460}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided){\super a}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0013}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5944}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Events: 33}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound{\super b}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.3457}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.0879}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Year: 0.8}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1{\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0013}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.4056}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5{\super d}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1412}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0148}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 IA 2: 67%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2.5465}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.941}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 460}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided)}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0054}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1733}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Events: 65}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5298}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.7907}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Year: 1.3}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0062}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.8347}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5815}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0437}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Final}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.9992}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.9992}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 460}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided)}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0228}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0228}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Events: 97}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.6655}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.6655}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Year: 2}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0233}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9767}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 {\super a}one-side p-value for experimental better than control\line {\super b}Hazard ratio required to cross bound\line {\super c}Cumulative type I error assuming binding futility bound\line {\super d}Cumulative power under the alternate hypothesis}\cell +\intbl\row\pard + + +} diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_basic.rtf b/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_basic.rtf new file mode 100644 index 00000000..04c1589e --- /dev/null +++ b/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_basic.rtf @@ -0,0 +1,209 @@ +{\rtf1\ansi +\deff0\deflang1033 +{\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} +{\f1\froman\fcharset161\fprq2 Times New Roman Greek;} +{\f2\fswiss\fcharset161\fprq2 Arial Greek;} +{\f3\fswiss\fcharset161\fprq2 Arial;} +{\f4\fswiss\fcharset161\fprq2 Helvetica;} +{\f5\fswiss\fcharset161\fprq2 Calibri;} +{\f6\froman\fcharset161\fprq2 Georgia;} +{\f7\ffroman\fcharset161\fprq2 Cambria;} +{\f8\fmodern\fcharset161\fprq2 Courier New;} +{\f9\ftech\fcharset161\fprq2 Symbol;} +} + + +\paperw12240\paperh15840 + +\margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 + +{\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Boundary Characteristics for Group Sequential Design}\par} + + +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Analysis}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Value}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Efficacy}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Futility}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 IA 1: 33%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3.0107}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.2388}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 460}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided){\super a}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0013}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5944}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Events: 33}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound{\super b}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.3457}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.0879}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Year: 0.8}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1{\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0013}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.4056}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5{\super d}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1412}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0148}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 IA 2: 67%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2.5465}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.941}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 460}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided)}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0054}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1733}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Events: 65}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5298}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.7907}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Year: 1.3}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0062}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.8347}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5815}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0437}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Final}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.9992}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.9992}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 460}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided)}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0228}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0228}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Events: 97}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.6655}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.6655}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Year: 2}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0233}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9767}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 {\super a}one-side p-value for experimental better than control\line {\super b}Hazard ratio required to cross bound\line {\super c}Cumulative type I error assuming binding futility bound\line {\super d}Cumulative power under the alternate hypothesis}\cell +\intbl\row\pard + + +} diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_design.rtf b/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_design.rtf new file mode 100644 index 00000000..4ffbeb68 --- /dev/null +++ b/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_design.rtf @@ -0,0 +1,209 @@ +{\rtf1\ansi +\deff0\deflang1033 +{\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} +{\f1\froman\fcharset161\fprq2 Times New Roman Greek;} +{\f2\fswiss\fcharset161\fprq2 Arial Greek;} +{\f3\fswiss\fcharset161\fprq2 Arial;} +{\f4\fswiss\fcharset161\fprq2 Helvetica;} +{\f5\fswiss\fcharset161\fprq2 Calibri;} +{\f6\froman\fcharset161\fprq2 Georgia;} +{\f7\ffroman\fcharset161\fprq2 Cambria;} +{\f8\fmodern\fcharset161\fprq2 Courier New;} +{\f9\ftech\fcharset161\fprq2 Symbol;} +} + + +\paperw12240\paperh15840 + +\margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 + +{\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Boundary Characteristics for Group Sequential Design}\par} + + +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Analysis}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Value}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Efficacy}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Futility}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 IA 1: 33%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3.0107}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.2387}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 34}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided){\super a}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0013}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5943}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound{\super b}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.3306}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.0917}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1{\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0013}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.4057}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5{\super d}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1412}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0148}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 IA 2: 67%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2.5465}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9411}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 67}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided)}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0054}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1733}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5158}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.783}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0062}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.8347}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5815}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0437}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Final}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.9992}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.9992}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 100}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided)}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0228}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0228}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.6542}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.6542}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0233}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9767}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 {\super a}one-side p-value for experimental better than control\line {\super b}Hazard ratio required to cross bound\line {\super c}Cumulative type I error assuming binding futility bound\line {\super d}Cumulative power under the alternate hypothesis}\cell +\intbl\row\pard + + +} diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_footnote.rtf b/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_footnote.rtf new file mode 100644 index 00000000..7422dc7a --- /dev/null +++ b/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_footnote.rtf @@ -0,0 +1,199 @@ +{\rtf1\ansi +\deff0\deflang1033 +{\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} +{\f1\froman\fcharset161\fprq2 Times New Roman Greek;} +{\f2\fswiss\fcharset161\fprq2 Arial Greek;} +{\f3\fswiss\fcharset161\fprq2 Arial;} +{\f4\fswiss\fcharset161\fprq2 Helvetica;} +{\f5\fswiss\fcharset161\fprq2 Calibri;} +{\f6\froman\fcharset161\fprq2 Georgia;} +{\f7\ffroman\fcharset161\fprq2 Cambria;} +{\f8\fmodern\fcharset161\fprq2 Courier New;} +{\f9\ftech\fcharset161\fprq2 Symbol;} +} + + +\paperw12240\paperh15840 + +\margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 + +{\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Boundary Characteristics for Group Sequential Design}\par} + + +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Analysis}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Value}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Efficacy}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Futility}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 IA 1: 33%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z{\super e}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3.0107}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.2387}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 34}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided){\super a}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0013}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5943}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound{\super b}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.3306}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.0917}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1{\super c}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0013}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.4057}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5{\super d}}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1412}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0148}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 IA 2: 67%}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2.5465}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9411}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 67}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided)}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0054}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1733}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5158}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.783}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0062}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.8347}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5815}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0437}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Final}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.9992}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.9992}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 100}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided)}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0228}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0228}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.6542}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.6542}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0233}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9767}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx2000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx5000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx7000 +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9}\cell +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1}\cell +\intbl\row\pard +\trowd\trgaph108\trleft0\trqc +\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 +\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 {\super a}one-side p-value for experimental better than control\line {\super b}Hazard ratio required to cross bound\line {\super c}Cumulative type I error assuming binding futility bound\line {\super d}Cumulative power under the alternate hypothesis\line {\super e}Z-Score}\cell +\intbl\row\pard + + +} diff --git a/tests/testthat/test-independent-as_rtf.R b/tests/testthat/test-independent-as_rtf.R new file mode 100644 index 00000000..2193334d --- /dev/null +++ b/tests/testthat/test-independent-as_rtf.R @@ -0,0 +1,123 @@ + +test_that("Snapshot test for gsBoundSummary", { + skip_on_cran() + + # Create a temporary file path for the RTF output + path <- tempfile(fileext = ".rtf") + + # Generate example data for gsBoundSummary + xgs <- gsSurv(lambdaC = .2, hr = .5, eta = .1, T = 2, minfup = 1.5) + + # Save the summary as RTF + gsBoundSummary(xgs, timename = "Year", tdigits = 1) %>% + as_rtf(file = path) + + # Test that the generated RTF file matches the snapshot + local_edition(3) + expect_snapshot_file(path, "gsBoundSummary.rtf") +}) + +test_that("Snapshot test for gsBoundSummary with design data", { + skip_on_cran() + + # Create a temporary file path for the RTF output + path <- tempfile(fileext = ".rtf") + + # Generate survival design data + ss <- nSurvival( + lambda1 = .2, lambda2 = .1, eta = .1, Ts = 2, Tr = .5, + sided = 1, alpha = .025, ratio = 2 + ) + xs <- gsDesign(nFixSurv = ss$n, n.fix = ss$nEvents, delta1 = log(ss$lambda2 / ss$lambda1)) + + # Save the design summary as RTF + gsBoundSummary(xs, logdelta = TRUE, ratio = ss$ratio) %>% + as_rtf(file = path) + + # Test that the generated RTF file matches the snapshot + local_edition(3) + expect_snapshot_file(path, "gsBoundSummary_design.rtf") +}) + +test_that("Snapshot test for gsBoundSummary with custom footnote", { + skip_on_cran() + + # Create a temporary file path for the RTF output + path <- tempfile(fileext = ".rtf") + + # Generate survival design data + ss <- nSurvival( + lambda1 = .2, lambda2 = .1, eta = .1, Ts = 2, Tr = .5, + sided = 1, alpha = .025, ratio = 2 + ) + xs <- gsDesign(nFixSurv = ss$n, n.fix = ss$nEvents, delta1 = log(ss$lambda2 / ss$lambda1)) + + # Save the design summary with custom footnote as RTF + gsBoundSummary(xs, logdelta = TRUE, ratio = ss$ratio) %>% + as_rtf(file = path, + footnote_specify = "Z", + footnote_text = "Z-Score") + + # Test that the generated RTF file matches the snapshot + local_edition(3) + expect_snapshot_file(path, "gsBoundSummary_footnote.rtf") +}) + +test_that("Snapshot test for gsBinomialExact", { + skip_on_cran() + + # Create a temporary file path for the RTF output + path <- tempfile(fileext = ".rtf") + + # Generate example data for gsBinomialExact + zz <- gsBinomialExact( + k = 3, theta = seq(0.1, 0.9, 0.1), n.I = c(12, 24, 36), + a = c(-1, 0, 11), b = c(5, 9, 12) + ) + + # Save the binomial exact summary as RTF + zz %>% + as_table() %>% + as_rtf( + file = path, + title = "Power/Type I Error and Expected Sample Size for a Group Sequential Design" + ) + + # Test that the generated RTF file matches the snapshot + local_edition(3) + expect_snapshot_file(path, "gsBinomialExact.rtf") +}) + +test_that("Snapshot test for gsBinomialExact for safety design with custom labels", { + skip_on_cran() + + # Create a temporary file path for the RTF output + path <- tempfile(fileext = ".rtf") + + # Generate safety design data + safety_design <- binomialSPRT( + p0 = .04, p1 = .1, alpha = .04, beta = .2, minn = 4, maxn = 75 + ) + + safety_power <- gsBinomialExact( + k = length(safety_design$n.I), + theta = seq(.02, .16, .02), + n.I = safety_design$n.I, + a = safety_design$lower$bound, + b = safety_design$upper$bound + ) + + # Save the safety power summary with custom labels as RTF + safety_power %>% + as_table() %>% + as_rtf( + file = path, + theta_label = "Underlying\nAE Rate", + prob_decimals = 3, + bound_label = c("Low Rate", "High Rate") + ) + + # Test that the generated RTF file matches the snapshot + local_edition(3) + expect_snapshot_file(path, "gsBinomialExact_safety.rtf") +}) From 29b4234e34bcd61945181f95b113de7844f0a72e Mon Sep 17 00:00:00 2001 From: Nan Xiao Date: Thu, 7 Nov 2024 04:13:34 -0500 Subject: [PATCH 2/2] Refactor `as_rtf()` snapshot tests --- .../gsBoundSummary_basic.rtf | 209 ------------------ .../gsBinomialExact-safety.rtf} | 0 .../gsBinomialExact.rtf | 2 +- .../gsBoundSummary-footnote.rtf} | 0 .../gsBoundSummary-gsDesign.rtf} | 0 .../gsBoundSummary-gsSurv.rtf} | 0 tests/testthat/test-independent-as_rtf.R | 123 ----------- tests/testthat/test-independent-test-as_rtf.R | 70 ++++++ 8 files changed, 71 insertions(+), 333 deletions(-) delete mode 100644 tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_basic.rtf rename tests/testthat/_snaps/{independent-as_rtf/gsBinomialExact_safety.rtf => independent-test-as_rtf/gsBinomialExact-safety.rtf} (100%) rename tests/testthat/_snaps/{independent-as_rtf => independent-test-as_rtf}/gsBinomialExact.rtf (98%) rename tests/testthat/_snaps/{independent-as_rtf/gsBoundSummary_footnote.rtf => independent-test-as_rtf/gsBoundSummary-footnote.rtf} (100%) rename tests/testthat/_snaps/{independent-as_rtf/gsBoundSummary_design.rtf => independent-test-as_rtf/gsBoundSummary-gsDesign.rtf} (100%) rename tests/testthat/_snaps/{independent-as_rtf/gsBoundSummary.rtf => independent-test-as_rtf/gsBoundSummary-gsSurv.rtf} (100%) delete mode 100644 tests/testthat/test-independent-as_rtf.R create mode 100644 tests/testthat/test-independent-test-as_rtf.R diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_basic.rtf b/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_basic.rtf deleted file mode 100644 index 04c1589e..00000000 --- a/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_basic.rtf +++ /dev/null @@ -1,209 +0,0 @@ -{\rtf1\ansi -\deff0\deflang1033 -{\fonttbl{\f0\froman\fcharset161\fprq2 Times New Roman;} -{\f1\froman\fcharset161\fprq2 Times New Roman Greek;} -{\f2\fswiss\fcharset161\fprq2 Arial Greek;} -{\f3\fswiss\fcharset161\fprq2 Arial;} -{\f4\fswiss\fcharset161\fprq2 Helvetica;} -{\f5\fswiss\fcharset161\fprq2 Calibri;} -{\f6\froman\fcharset161\fprq2 Georgia;} -{\f7\ffroman\fcharset161\fprq2 Cambria;} -{\f8\fmodern\fcharset161\fprq2 Courier New;} -{\f9\ftech\fcharset161\fprq2 Symbol;} -} - - -\paperw12240\paperh15840 - -\margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 - -{\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Boundary Characteristics for Group Sequential Design}\par} - - -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrb\brdrw15\clvertalb\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrdb\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalb\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Analysis}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Value}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Efficacy}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Futility}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 IA 1: 33%}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 3.0107}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 -0.2388}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 460}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided){\super a}}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0013}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5944}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Events: 33}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound{\super b}}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.3457}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.0879}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Year: 0.8}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1{\super c}}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0013}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.4056}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5{\super d}}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1412}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0148}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 IA 2: 67%}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 2.5465}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.941}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 460}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided)}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0054}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1733}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Events: 65}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5298}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.7907}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Year: 1.3}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0062}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.8347}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.5815}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0437}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 }\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Final}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 Z}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.9992}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 1.9992}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 N: 460}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 p (1-sided)}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0228}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0228}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Events: 97}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 ~HR at bound}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.6655}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.6655}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 Year: 2}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=1}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.0233}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9767}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx2000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx5000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx7000 -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 }\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 P(Cross) if HR=0.5}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.9}\cell -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\qc\fs18{\f0 0.1}\cell -\intbl\row\pard -\trowd\trgaph108\trleft0\trqc -\clbrdrl\brdrs\brdrw15\clbrdrt\brdrw15\clbrdrr\brdrs\brdrw15\clbrdrb\brdrdb\brdrw15\clvertalt\cellx9000 -\pard\hyphpar0\sb15\sa15\fi0\li0\ri0\ql\fs18{\f0 {\super a}one-side p-value for experimental better than control\line {\super b}Hazard ratio required to cross bound\line {\super c}Cumulative type I error assuming binding futility bound\line {\super d}Cumulative power under the alternate hypothesis}\cell -\intbl\row\pard - - -} diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBinomialExact_safety.rtf b/tests/testthat/_snaps/independent-test-as_rtf/gsBinomialExact-safety.rtf similarity index 100% rename from tests/testthat/_snaps/independent-as_rtf/gsBinomialExact_safety.rtf rename to tests/testthat/_snaps/independent-test-as_rtf/gsBinomialExact-safety.rtf diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBinomialExact.rtf b/tests/testthat/_snaps/independent-test-as_rtf/gsBinomialExact.rtf similarity index 98% rename from tests/testthat/_snaps/independent-as_rtf/gsBinomialExact.rtf rename to tests/testthat/_snaps/independent-test-as_rtf/gsBinomialExact.rtf index ebde3217..ca14cfee 100644 --- a/tests/testthat/_snaps/independent-as_rtf/gsBinomialExact.rtf +++ b/tests/testthat/_snaps/independent-test-as_rtf/gsBinomialExact.rtf @@ -17,7 +17,7 @@ \margl1800\margr1440\margt2520\margb1800\headery2520\footery1449 -{\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Power/Type I Error and Expected Sample Size for a Group Sequential Design}\par} +{\pard\hyphpar\sb180\sa180\fi0\li0\ri0\qc\fs24{\f0 Power/type I error and expected sample size for a group sequential design}\par} \trowd\trgaph108\trleft0\trqc diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_footnote.rtf b/tests/testthat/_snaps/independent-test-as_rtf/gsBoundSummary-footnote.rtf similarity index 100% rename from tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_footnote.rtf rename to tests/testthat/_snaps/independent-test-as_rtf/gsBoundSummary-footnote.rtf diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_design.rtf b/tests/testthat/_snaps/independent-test-as_rtf/gsBoundSummary-gsDesign.rtf similarity index 100% rename from tests/testthat/_snaps/independent-as_rtf/gsBoundSummary_design.rtf rename to tests/testthat/_snaps/independent-test-as_rtf/gsBoundSummary-gsDesign.rtf diff --git a/tests/testthat/_snaps/independent-as_rtf/gsBoundSummary.rtf b/tests/testthat/_snaps/independent-test-as_rtf/gsBoundSummary-gsSurv.rtf similarity index 100% rename from tests/testthat/_snaps/independent-as_rtf/gsBoundSummary.rtf rename to tests/testthat/_snaps/independent-test-as_rtf/gsBoundSummary-gsSurv.rtf diff --git a/tests/testthat/test-independent-as_rtf.R b/tests/testthat/test-independent-as_rtf.R deleted file mode 100644 index 2193334d..00000000 --- a/tests/testthat/test-independent-as_rtf.R +++ /dev/null @@ -1,123 +0,0 @@ - -test_that("Snapshot test for gsBoundSummary", { - skip_on_cran() - - # Create a temporary file path for the RTF output - path <- tempfile(fileext = ".rtf") - - # Generate example data for gsBoundSummary - xgs <- gsSurv(lambdaC = .2, hr = .5, eta = .1, T = 2, minfup = 1.5) - - # Save the summary as RTF - gsBoundSummary(xgs, timename = "Year", tdigits = 1) %>% - as_rtf(file = path) - - # Test that the generated RTF file matches the snapshot - local_edition(3) - expect_snapshot_file(path, "gsBoundSummary.rtf") -}) - -test_that("Snapshot test for gsBoundSummary with design data", { - skip_on_cran() - - # Create a temporary file path for the RTF output - path <- tempfile(fileext = ".rtf") - - # Generate survival design data - ss <- nSurvival( - lambda1 = .2, lambda2 = .1, eta = .1, Ts = 2, Tr = .5, - sided = 1, alpha = .025, ratio = 2 - ) - xs <- gsDesign(nFixSurv = ss$n, n.fix = ss$nEvents, delta1 = log(ss$lambda2 / ss$lambda1)) - - # Save the design summary as RTF - gsBoundSummary(xs, logdelta = TRUE, ratio = ss$ratio) %>% - as_rtf(file = path) - - # Test that the generated RTF file matches the snapshot - local_edition(3) - expect_snapshot_file(path, "gsBoundSummary_design.rtf") -}) - -test_that("Snapshot test for gsBoundSummary with custom footnote", { - skip_on_cran() - - # Create a temporary file path for the RTF output - path <- tempfile(fileext = ".rtf") - - # Generate survival design data - ss <- nSurvival( - lambda1 = .2, lambda2 = .1, eta = .1, Ts = 2, Tr = .5, - sided = 1, alpha = .025, ratio = 2 - ) - xs <- gsDesign(nFixSurv = ss$n, n.fix = ss$nEvents, delta1 = log(ss$lambda2 / ss$lambda1)) - - # Save the design summary with custom footnote as RTF - gsBoundSummary(xs, logdelta = TRUE, ratio = ss$ratio) %>% - as_rtf(file = path, - footnote_specify = "Z", - footnote_text = "Z-Score") - - # Test that the generated RTF file matches the snapshot - local_edition(3) - expect_snapshot_file(path, "gsBoundSummary_footnote.rtf") -}) - -test_that("Snapshot test for gsBinomialExact", { - skip_on_cran() - - # Create a temporary file path for the RTF output - path <- tempfile(fileext = ".rtf") - - # Generate example data for gsBinomialExact - zz <- gsBinomialExact( - k = 3, theta = seq(0.1, 0.9, 0.1), n.I = c(12, 24, 36), - a = c(-1, 0, 11), b = c(5, 9, 12) - ) - - # Save the binomial exact summary as RTF - zz %>% - as_table() %>% - as_rtf( - file = path, - title = "Power/Type I Error and Expected Sample Size for a Group Sequential Design" - ) - - # Test that the generated RTF file matches the snapshot - local_edition(3) - expect_snapshot_file(path, "gsBinomialExact.rtf") -}) - -test_that("Snapshot test for gsBinomialExact for safety design with custom labels", { - skip_on_cran() - - # Create a temporary file path for the RTF output - path <- tempfile(fileext = ".rtf") - - # Generate safety design data - safety_design <- binomialSPRT( - p0 = .04, p1 = .1, alpha = .04, beta = .2, minn = 4, maxn = 75 - ) - - safety_power <- gsBinomialExact( - k = length(safety_design$n.I), - theta = seq(.02, .16, .02), - n.I = safety_design$n.I, - a = safety_design$lower$bound, - b = safety_design$upper$bound - ) - - # Save the safety power summary with custom labels as RTF - safety_power %>% - as_table() %>% - as_rtf( - file = path, - theta_label = "Underlying\nAE Rate", - prob_decimals = 3, - bound_label = c("Low Rate", "High Rate") - ) - - # Test that the generated RTF file matches the snapshot - local_edition(3) - expect_snapshot_file(path, "gsBinomialExact_safety.rtf") -}) diff --git a/tests/testthat/test-independent-test-as_rtf.R b/tests/testthat/test-independent-test-as_rtf.R new file mode 100644 index 00000000..efd6b29b --- /dev/null +++ b/tests/testthat/test-independent-test-as_rtf.R @@ -0,0 +1,70 @@ +test_that("Snapshot test for gsSurv gsBoundSummary as_rtf", { + skip_on_cran() + + path <- tempfile(fileext = ".rtf") + xgs <- gsSurv(lambdaC = 0.2, hr = 0.5, eta = 0.1, T = 2, minfup = 1.5) + tbl <- gsBoundSummary(xgs, timename = "Year", tdigits = 1) + as_rtf(tbl, file = path) + + local_edition(3) + expect_snapshot_file(path, "gsBoundSummary-gsSurv.rtf") +}) + +test_that("Snapshot test for gsDesign gsBoundSummary as_rtf", { + skip_on_cran() + + path <- tempfile(fileext = ".rtf") + + ss <- nSurvival(lambda1 = 0.2, lambda2 = 0.1, eta = 0.1, Ts = 2, Tr = 0.5, sided = 1, alpha = 0.025, ratio = 2) + xs <- gsDesign(nFixSurv = ss$n, n.fix = ss$nEvents, delta1 = log(ss$lambda2 / ss$lambda1)) + tbl <- gsBoundSummary(xs, logdelta = TRUE, ratio = ss$ratio) + as_rtf(tbl, file = path) + + local_edition(3) + expect_snapshot_file(path, "gsBoundSummary-gsDesign.rtf") +}) + +test_that("Snapshot test for gsDesign gsBoundSummary as_rtf with custom footnote", { + skip_on_cran() + + path <- tempfile(fileext = ".rtf") + ss <- nSurvival(lambda1 = 0.2, lambda2 = 0.1, eta = 0.1, Ts = 2, Tr = 0.5, sided = 1, alpha = 0.025, ratio = 2) + xs <- gsDesign(nFixSurv = ss$n, n.fix = ss$nEvents, delta1 = log(ss$lambda2 / ss$lambda1)) + tbl <- gsBoundSummary(xs, logdelta = TRUE, ratio = ss$ratio) + as_rtf(tbl, file = path, footnote_specify = "Z", footnote_text = "Z-Score") + + local_edition(3) + expect_snapshot_file(path, "gsBoundSummary-footnote.rtf") +}) + +test_that("Snapshot test for gsBinomialExact as_table as_rtf", { + skip_on_cran() + + path <- tempfile(fileext = ".rtf") + zz <- gsBinomialExact(k = 3, theta = seq(0.1, 0.9, 0.1), n.I = c(12, 24, 36), a = c(-1, 0, 11), b = c(5, 9, 12)) + tbl <- as_table(zz) + as_rtf(tbl, file = path, title = "Power/type I error and expected sample size for a group sequential design") + + local_edition(3) + expect_snapshot_file(path, "gsBinomialExact.rtf") +}) + +test_that("Snapshot test for binomialSPRT gsBinomialExact safety design with custom labels", { + skip_on_cran() + + path <- tempfile(fileext = ".rtf") + safety_design <- binomialSPRT(p0 = 0.04, p1 = 0.1, alpha = 0.04, beta = 0.2, minn = 4, maxn = 75) + safety_power <- gsBinomialExact( + k = length(safety_design$n.I), + theta = seq(0.02, 0.16, 0.02), + n.I = safety_design$n.I, + a = safety_design$lower$bound, + b = safety_design$upper$bound + ) + + tbl <- as_table(safety_power) + as_rtf(tbl, file = path, theta_label = "Underlying\nAE Rate", prob_decimals = 3, bound_label = c("Low Rate", "High Rate")) + + local_edition(3) + expect_snapshot_file(path, "gsBinomialExact-safety.rtf") +})