diff --git a/main/404.html b/main/404.html index 02bf1b6..47cd139 100644 --- a/main/404.html +++ b/main/404.html @@ -1,4 +1,5 @@ - + + @@ -30,13 +31,7 @@ + @@ -60,8 +37,7 @@

GNU General Public License

Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

-

Preamble -

+

Preamble

The GNU General Public License is a free, copyleft license for software and other kinds of works.

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program–to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

@@ -74,11 +50,9 @@

PreambleThe precise terms and conditions for copying, distribution and modification follow.

-

TERMS AND CONDITIONS -

+

TERMS AND CONDITIONS

-

0. Definitions -

+

0. Definitions

“This License” refers to version 3 of the GNU General Public License.

“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.

@@ -89,8 +63,7 @@

0. DefinitionsAn interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

-

1. Source Code -

+

1. Source Code

The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.

A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

@@ -99,30 +72,25 @@

1. Source CodeThe Corresponding Source for a work in source code form is that same work.

-

2. Basic Permissions -

+

2. Basic Permissions

All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

- +

No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work’s users, your or third parties’ legal rights to forbid circumvention of technological measures.

-

4. Conveying Verbatim Copies -

+

4. Conveying Verbatim Copies

You may convey verbatim copies of the Program’s source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

-

5. Conveying Modified Source Versions -

+

5. Conveying Modified Source Versions

You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

-

A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

-

6. Conveying Non-Source Forms -

+

6. Conveying Non-Source Forms

You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:

-
-

9. Acceptance Not Required for Having Copies -

+

9. Acceptance Not Required for Having Copies

You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

-

10. Automatic Licensing of Downstream Recipients -

+

10. Automatic Licensing of Downstream Recipients

Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.

An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party’s predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

-

11. Patents -

+

11. Patents

A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor’s “contributor version”.

A contributor’s “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor’s essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

@@ -213,43 +170,36 @@

11. Patents -

12. No Surrender of Others’ Freedom -

+

12. No Surrender of Others’ Freedom

If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

-

13. Use with the GNU Affero General Public License -

+

13. Use with the GNU Affero General Public License

Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.

-

14. Revised Versions of this License -

+

14. Revised Versions of this License

The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.

If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

-

15. Disclaimer of Warranty -

+

15. Disclaimer of Warranty

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

-

16. Limitation of Liability -

+

16. Limitation of Liability

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

-

17. Interpretation of Sections 15 and 16 -

+

17. Interpretation of Sections 15 and 16

If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

-

How to Apply These Terms to Your New Programs -

+

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

<one line to give the program's name and a brief idea of what it does.>
@@ -280,8 +230,7 @@ 

How to Apply These Terms

-
+ - + + + - - diff --git a/main/authors.html b/main/authors.html index 8f9ee46..da7e49d 100644 --- a/main/authors.html +++ b/main/authors.html @@ -1,17 +1,5 @@ - - - - - - -Authors and Citation • mtdesign - - - - - - - + +Authors and Citation • mtdesign Skip to contents @@ -27,23 +15,12 @@ + @@ -57,13 +34,11 @@

Authors and Citation

Authors

-
+

Citation

@@ -83,8 +58,7 @@

Citation

- + - + + + - - diff --git a/main/index.html b/main/index.html index 4e58f32..90fbce2 100644 --- a/main/index.html +++ b/main/index.html @@ -1,4 +1,5 @@ - + + @@ -32,13 +33,7 @@ + @@ -55,8 +32,7 @@

Changelog

Source: NEWS.md - - + - + + + - - diff --git a/main/pkgdown.yml b/main/pkgdown.yml index 0fd35cc..7d9395a 100644 --- a/main/pkgdown.yml +++ b/main/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: '3.4' pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2024-10-31T15:51Z +last_built: 2024-11-01T13:52Z urls: reference: https://openpharma.github.io/mtdesign/reference article: https://openpharma.github.io/mtdesign/articles diff --git a/main/reference/augmentGrid.html b/main/reference/augmentGrid.html index 71a6289..d4bd00e 100644 --- a/main/reference/augmentGrid.html +++ b/main/reference/augmentGrid.html @@ -1,21 +1,7 @@ - - - - - - -Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid • mtdesign - - - - - - - - - + +Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid • mtdesign Skip to contents @@ -31,23 +17,12 @@ + @@ -66,48 +41,38 @@

Augment a grid of candidate designs with type 1 and type 2 error probabiliti
-

Usage -

+

Usage

augmentGrid(d, parallel = TRUE, cores = NA, minChunkSize = 1e+05)
-

Arguments -

+

Arguments

-
-
d -
+
d

a tibble created by `createGrid`

-
parallel -
+
parallel

use parallelisation if available

-
cores -
+
cores

the number of cores to use when parallelising. If <code>NA</code>, all available cores are requested

-
minChunkSize -
+
minChunkSize

The minimum size of the grid before paralellisation is attempted

-
-
+
-

Value -

+

Value

an augmented grid tibble

-

Usage Notes -

+

Usage Notes

Regardless of the value of `parallel`, parallelisation is only @@ -117,15 +82,13 @@

Usage Notes -

Examples -

+

Examples

x <- createGrid(p0 = 0.1, p1 = 0.30, alpha = 0.1, beta = 0.1, nMin = 24, nMax = 32) %>%
   augmentGrid(parallel = FALSE)
 
- +
-
- + + + - - diff --git a/main/reference/createGrid.html b/main/reference/createGrid.html index 2ba60e1..d510ecf 100644 --- a/main/reference/createGrid.html +++ b/main/reference/createGrid.html @@ -1,19 +1,5 @@ - - - - - - -Create a grid of candidate designs — createGrid • mtdesign - - - - - - - - - + +Create a grid of candidate designs — createGrid • mtdesign Skip to contents @@ -29,23 +15,12 @@ + @@ -63,8 +38,7 @@

Create a grid of candidate designs

-

Usage -

+

Usage

createGrid(
   p0,
   p1,
@@ -78,63 +52,50 @@ 

Usage

-

Arguments -

+

Arguments

-
-
p0 -
+
p0

the response rate under the null hypothesis

-
p1 -
+
p1

the response rate under the alternate hypothesis

-
alpha -
+
alpha

the desired (one-sided) type 1 error rate

-
beta -
+
beta

the desired type 2 error rate

-
power -
+
power

an alternative to beta

-
nMin -
+
nMin

the lower bound for the search grid. If NA, searchBounds is called to provide an appropriate value

-
nMax -
+
nMax

the lower bound for the search grid. If NA, searchBounds is called to provide an appropriate value

-
mander -
+
mander

is a Mander & Thompson or a Simon's design required?

-
-
+
-

Value -

+

Value

a tibble. See Usage notes for a list and description of columns.

-

Examples -

+

Examples

# Standard use for a Simon's 2-stage design
 x <- createGrid(p0 = 0.1, p1 = 0.5, alpha = 0.1, beta = 0.1, mander = FALSE)
 # Custom search bounds for a Mander & Thompson design
@@ -142,8 +103,7 @@ 

Examples -

+
- + + + - - diff --git a/main/reference/index.html b/main/reference/index.html index e444d5d..ee5b060 100644 --- a/main/reference/index.html +++ b/main/reference/index.html @@ -1,17 +1,5 @@ - - - - - - -Package index • mtdesign - - - - - - - + +Package index • mtdesign Skip to contents @@ -27,23 +15,12 @@ + @@ -55,61 +32,48 @@

Package index

-

All functions -

+

All functions

-
-
+
-
-
+
augmentGrid()
Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination
-
-
-
+
createGrid()
Create a grid of candidate designs
-
-
-
+
obtainDesign()
Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies
-
-
-
+
powerPlot()
Plot the power curve(s) for the given design(s)
-
-
-
+
searchBounds()
Obtain default bounds for the construction of the search grid.
-
-
- - + +
-
- + + + - - diff --git a/main/reference/obtainDesign.html b/main/reference/obtainDesign.html index f788b1c..ff44d48 100644 --- a/main/reference/obtainDesign.html +++ b/main/reference/obtainDesign.html @@ -1,25 +1,11 @@ - - - - - - -Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign • mtdesign - - - - - -Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign • mtdesign - - - +minimax designs."> Skip to contents @@ -35,23 +21,12 @@ + @@ -72,8 +47,7 @@

Finds optimal and minimax designs for either Simon's 2-stage or Mander &
-

Usage -

+

Usage

obtainDesign(
   grid = NULL,
   p0 = NA,
@@ -86,13 +60,10 @@ 

Usage

-

Arguments -

+

Arguments

-
-
grid -
+
grid

Optional. A tibble created by createGrid. If NULL, then p0, p1, alpha and beta must be specified and createGrid is called to generate the required grid. If not @@ -100,45 +71,37 @@

Argumentsp0 - +
p0

the response rate under the null hypothesis

-
p1 -
+
p1

the response rate under the alternate hypothesis

-
alpha -
+
alpha

the desired (one-sided) type 1 error rate

-
beta -
+
beta

the desired type 2 error rate

-
fullGrid -
+
fullGrid

should the full grid of all possible designs be returned, or simply the optimal and minimax solutions? For a Mander and Thompson design, optimal and minimax designs are returned for both the null and alternate hypotheses. See Usage Notes below.

-
... -
+
...

passed to `createGrid` or `augmentGrid`. In particular mander=TRUE for a Mander & Thompson design or mander=FALSE for a Simon's 2-stage design.

-

-
+
-

Value -

+

Value

a tibble created by createGrid. If fullGrid == FALSE the table contains an additional column, Criterion indicating the type of design. Possible values for @@ -147,8 +110,7 @@

Value Thompson designs.

-

Usage notes -

+

Usage notes

If grid is not NULL it is possible that none of the candidate @@ -162,8 +124,7 @@

Usage notes -

Examples -

+

Examples

# \donttest{
 # Standard use (Simon's 2-stage design)
 createGrid(p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, mander = FALSE) %>%
@@ -194,8 +155,7 @@ 

Examples -

+
- + + + - - diff --git a/main/reference/pipe.html b/main/reference/pipe.html index c999ddc..67c08b1 100644 --- a/main/reference/pipe.html +++ b/main/reference/pipe.html @@ -1,19 +1,5 @@ - - - - - - -Pipe operator — %>% • mtdesign - - - - - - - - - + +Pipe operator — %>% • mtdesign Skip to contents @@ -29,23 +15,12 @@ + @@ -63,37 +38,29 @@

Pipe operator

-

Usage -

+

Usage

lhs %>% rhs
-

Arguments -

+

Arguments

-
-
lhs -
+
lhs

A value or the magrittr placeholder.

-
rhs -
+
rhs

A function call using the magrittr semantics.

-
-
+
-

Value -

+

Value

The result of calling `rhs(lhs)`.

- +
-
- + + + - - diff --git a/main/reference/powerPlot.html b/main/reference/powerPlot.html index 21298e5..e2a7daa 100644 --- a/main/reference/powerPlot.html +++ b/main/reference/powerPlot.html @@ -1,19 +1,5 @@ - - - - - - -Plot the power curve(s) for the given design(s) — powerPlot • mtdesign - - - - - - - - - + +Plot the power curve(s) for the given design(s) — powerPlot • mtdesign Skip to contents @@ -29,23 +15,12 @@ + @@ -63,51 +38,42 @@

Plot the power curve(s) for the given design(s)

-

Usage -

+

Usage

powerPlot(grid, probs = seq(0, 1, 0.01))
-

Arguments -

+

Arguments

-
-
grid -
+
grid

the tibble containing the designs to be plotted

-
probs -
+
probs

the response rates for which the rejection probabilities are to be plotted

-
-
+
-

Value -

+

Value

the ggplot object containing the power curve(s)

-

Examples -

+

Examples

createGrid(p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, mander = FALSE) %>%
   augmentGrid(cores = 2) %>%
   obtainDesign() %>%
   powerPlot(probs = seq(0, 0.5, 0.025))
 #> Warning: one argument not used by format 'Parallelisation has been requested, but the grid size [72814] is less than the minimum chunk size [1e+05].  Parallelisation will not occur'
-#> pkgdown 2024-10-31 15:51:49 INFO pkgdown::build_site: Parallelisation has been requested, but the grid size [72814] is less than the minimum chunk size [1e+05].  Parallelisation will not occur
+#> pkgdown 2024-11-01 13:52:51 INFO pkgdown::build_site: Parallelisation has been requested, but the grid size [72814] is less than the minimum chunk size [1e+05].  Parallelisation will not occur
 
 
- +
-
- + + + - - diff --git a/main/reference/searchBounds.html b/main/reference/searchBounds.html index e5ccd4c..472397b 100644 --- a/main/reference/searchBounds.html +++ b/main/reference/searchBounds.html @@ -1,21 +1,7 @@ - - - - - - -Obtain default bounds for the construction of the search grid. — searchBounds • mtdesign - - - - - - - - - + +Obtain default bounds for the construction of the search grid. — searchBounds • mtdesign Skip to contents @@ -31,23 +17,12 @@ + @@ -66,54 +41,43 @@

Obtain default bounds for the construction of the search grid.

-

Usage -

+

Usage

searchBounds(p0, p1, alpha = 0.05, beta = 0.2, twoSided = TRUE)
-

Arguments -

+

Arguments

-
-
p0 -
+
p0

the response rate under the null hypothesis

-
p1 -
+
p1

the response rate under the alternate hypothesis

-
alpha -
+
alpha

the desired (one-sided) type 1 error rate

-
beta -
+
beta

the desired type 2 error rate

-
twoSided -
+
twoSided

two- or one-sided significance level?

-
-
+
-

Value -

+

Value

a list with three elements: "n" - the single stage sample size from Fleiss et al; "min" - the lower bound, 0.8*n; "max" - the upper bound, 2*n. floor() and ceiling() are applied as appropriate.

- +
-
- + + + - - diff --git a/main/search.json b/main/search.json index 775ba1b..5ca4b27 100644 --- a/main/search.json +++ b/main/search.json @@ -1 +1 @@ -[{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://openpharma.github.io/mtdesign/main/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://openpharma.github.io/mtdesign/main/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"John Kirkpatrick. Author, maintainer.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kirkpatrick J (2024). mtdesign: Mander Thompson Designs. R package version 0.1.2, https://github.com/openpharma/mtdesign.","code":"@Manual{, title = {mtdesign: Mander and Thompson Designs}, author = {John Kirkpatrick}, year = {2024}, note = {R package version 0.1.2}, url = {https://github.com/openpharma/mtdesign}, }"},{"path":[]},{"path":"https://openpharma.github.io/mtdesign/main/index.html","id":"introduction","dir":"","previous_headings":"","what":"Introduction","title":"Mander and Thompson Designs","text":"package mtdesign provides implementations Simon (1989) Mander & Thompson (2010). implementations Simon’s methods available - example, ph2simon function clinfun package (Seshan 2018), provide easy access non-optimal solutions way mtdesign . aware R-based implementations Mander & Thompson’s extension Simon.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Mander and Thompson Designs","text":"available CRAN, can install mtdesign usual way: install.packages(\"mtdesign\") can install development version mtdesign GitHub : devtools::install_github(\"openpharma/mtdesign\")","code":""},{"path":"https://openpharma.github.io/mtdesign/main/index.html","id":"set-up-vignette-environment","dir":"","previous_headings":"","what":"Set up vignette environment","title":"Mander and Thompson Designs","text":"","code":"# By policy, on CRAN, use only two cores, no matter how many are available. if (requireNamespace(\"parallel\", quietly = TRUE)) { maxCores <- parallel::detectCores() maxCores <- ifelse(identical(Sys.getenv(\"NOT_CRAN\"), \"true\"), maxCores, min(maxCores, 2)) } else { maxCores <- 1 }"},{"path":"https://openpharma.github.io/mtdesign/main/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Mander and Thompson Designs","text":"Suppose treatments response rate less 5% interest response rate least 25% worthy development. Simon’s 2-stage design seek efficacy signal significance level 5% power 80% required. table shows optimal design requirements 0/9 2/17. expected sample size 12.0 probability early termination 63%. significance level actually achieved 4.7% power level achieved 100% - 18.8% = 81.2%. power curves designs easily plotted. Obtaining equivalent Mander & Thompson designs requires small change calls.","code":"library(mtdesign) library(knitr) library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union simonDesign <- obtainDesign(p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, mander = FALSE, parallel = FALSE) simonDesign %>% select(-Alpha, -Beta, -p0, -p1, -PETAlt, -AveSizeAlt) %>% kable(digits = c(0, 0, 0, 0, 3, 3, 2, 1, NA)) powerPlot(simonDesign) manderDesign <- obtainDesign( p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, cores = maxCores ) manderDesign %>% select(-Alpha, -Beta, -p0, -p1) %>% kable(digits = c(0, 0, 0, 0, 3, 3, 2, 2, 2, 1, NA)) powerPlot(manderDesign)"},{"path":"https://openpharma.github.io/mtdesign/main/index.html","id":"constrained-designs","dir":"","previous_headings":"Example","what":"Constrained designs","title":"Mander and Thompson Designs","text":"Suppose trial, whatever reason, restricted using 8 participants stage. shown , optimal Simon’s two stage design 0/9 2/17. ’s close n1 = 8, n = 16. (slightly) sub-optimal design n1 = 8, n = 16? , isn’t. close can get? Best sub-optimal design required significance level Best sub-optimal design required power choice lies design achieves required significance level power 77.1% one required power significance level 15.1%. designs accept null hypothesis responders seen first group eight participants. differ critical value end stage 2: 1 maintain power, 2 maintain significance level. power curve designs can compared globally optimal design.","code":"x <- createGrid(p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, mander = FALSE) y <- x %>% filter(nStage1 == 8, nTotal == 16) z <- y %>% obtainDesign(cores = maxCores) #> Warning: No acceptable designs were found. if (nrow(z) == 0) { print(\"No acceptable designs were found.\") } else { select(-Alpha, -Beta, -p0, -p1, -PETAlt, -AveSizeAlt) %>% z() %>% select(-Alpha, -Beta, -p0, -p1, -PETAlt, -AveSizeAlt) %>% kable(digits = c(0, 0, 0, 0, 3, 3, 2, 1, NA)) } #> [1] \"No acceptable designs were found.\" z1 <- y %>% augmentGrid() bestSize <- z1 %>% filter(Type1 < Alpha) %>% slice_min(Type2) bestSize %>% select(-Alpha, -Beta, -p0, -p1, -PETAlt, -AveSizeAlt) %>% kable( caption = \"Best sub-optimal design with required significance level\", digits = c(0, 0, 0, 0, 3, 3, 2, 1, NA) ) bestPower <- z1 %>% filter(Type2 < Beta) %>% slice_min(Type1) bestPower %>% select(-Alpha, -Beta, -p0, -p1, -PETAlt, -AveSizeAlt) %>% kable( caption = \"Best sub-optimal design with required power\", digits = c(0, 0, 0, 0, 3, 3, 2, 1, NA) ) plotData1 <- simonDesign %>% filter(Criterion == \"optimal\") %>% bind_rows(list(bestSize, bestPower)) powerPlot(plotData1)"},{"path":"https://openpharma.github.io/mtdesign/main/index.html","id":"package-structure","dir":"","previous_headings":"","what":"Package structure","title":"Mander and Thompson Designs","text":"mtdesign package consists three main functions: createGrid creates grid (nStage1, rFutility, nTotal rTotal Simon’s design nStage1, rFutility, rSuccess, nTotal rTotal Mander & Thompson design) brute force search required design(s) conducted augmentGridtakes grid created createGrid adds columns probability early termination, Type 1 error, Type 2 error expected sample size . obtainDesign takes augmented grid identifies optimal minimax designs","code":""},{"path":"https://openpharma.github.io/mtdesign/main/index.html","id":"error-and-warning-messages-and-logging","dir":"","previous_headings":"","what":"Error and warning messages and logging","title":"Mander and Thompson Designs","text":"mtdesign package supports logging via futile.logger package (Rowe 2016). functions simply report Entry Exit DEBUG level. augmentGrid function reports steps parallelisation process TRACE level.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/index.html","id":"parallelisation","dir":"","previous_headings":"","what":"Parallelisation","title":"Mander and Thompson Designs","text":"known closed form solution obtaining solutions either Simon’s original equations Mander & Thompson’s extensions. mtdesign package uses brute force approach evaluate operating characteristics reasonable potential designs. grids can quickly become large, particularly Mander & Thompson designs. example, createGrid(0.2, 0.4, alpha=0.1, beta=0.1) creates grid almost 11 million candidate designs. mtdesign uses paralellisation attempt speed evaluation candidate designs. augmentGrid function allows users control parallelisation process: parallel parameter defaults TRUE defines whether paralellisation used. cores parameter specifies many cores used. default value, NA tells mtdesign use available (defined parallel::detectCores()), cores. minChunkSize determines smallest grid candidate designs trigger paralellisation. default value 100000. parallel package required parallelisation. parallelisation needed (ie grid size exceeds minChunkSize) requested parallel package installed, error message thrown augmentation grid stops. paralellisation requested grid contains one million rows, warning produced.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/index.html","id":"troubleshooting","dir":"","previous_headings":"","what":"Troubleshooting","title":"Mander and Thompson Designs","text":", installing using mtdesign package, get error regarding syntax error .hpp file, similar following issue likely mismatch g++ compiler used headers supplied BH package. two solutions know : Upgrade g++ Downgrade version BH package using. appropriate package version depends version g++ compiler using.","code":".../BH/include/boost/math/tools/fraction.hpp:84:48: error: ‘long double’ is not a class, struct, or union type using value_type = typename T::value_type;"},{"path":[]},{"path":"https://openpharma.github.io/mtdesign/main/reference/augmentGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"Augment grid candidate designs type 1 type 2 error probabilities, expected sample sizes probabilities early termination","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/augmentGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"","code":"augmentGrid(d, parallel = TRUE, cores = NA, minChunkSize = 1e+05)"},{"path":"https://openpharma.github.io/mtdesign/main/reference/augmentGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"d tibble created `createGrid` parallel use parallelisation available cores number cores use parallelising. NA<\/code>, available cores requested minChunkSize minimum size grid paralellisation attempted","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/augmentGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"augmented grid tibble","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/augmentGrid.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"Regardless value `parallel`, parallelisation used size grid greater chunkSize<\/code>. paralellisation requested needed, exception thrown parallel package available.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/augmentGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"","code":"x <- createGrid(p0 = 0.1, p1 = 0.30, alpha = 0.1, beta = 0.1, nMin = 24, nMax = 32) %>% augmentGrid(parallel = FALSE)"},{"path":"https://openpharma.github.io/mtdesign/main/reference/createGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a grid of candidate designs — createGrid","title":"Create a grid of candidate designs — createGrid","text":"Create grid candidate designs","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/createGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a grid of candidate designs — createGrid","text":"","code":"createGrid( p0, p1, alpha = 0.1, beta = NA, power = ifelse(is.na(beta), 0.9, 1 - beta), nMin = NA, nMax = NA, mander = TRUE )"},{"path":"https://openpharma.github.io/mtdesign/main/reference/createGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a grid of candidate designs — createGrid","text":"p0 response rate null hypothesis p1 response rate alternate hypothesis alpha desired (one-sided) type 1 error rate beta desired type 2 error rate power alternative beta nMin lower bound search grid. NA, searchBounds called provide appropriate value nMax lower bound search grid. NA, searchBounds called provide appropriate value mander Mander & Thompson Simon's design required?","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/createGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a grid of candidate designs — createGrid","text":"tibble. See Usage notes list description columns.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/createGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a grid of candidate designs — createGrid","text":"","code":"# Standard use for a Simon's 2-stage design x <- createGrid(p0 = 0.1, p1 = 0.5, alpha = 0.1, beta = 0.1, mander = FALSE) # Custom search bounds for a Mander & Thompson design y <- createGrid(p0 = 0.1, p1 = 0.4, alpha = 0.1, beta = 0.1, nMin = 20, nMax = 30)"},{"path":"https://openpharma.github.io/mtdesign/main/reference/obtainDesign.html","id":null,"dir":"Reference","previous_headings":"","what":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"obtainDesign essentially wrapper calls createGrid augmentGrid followed simple filtering candidate designs identify optimal minimax designs.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/obtainDesign.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"","code":"obtainDesign( grid = NULL, p0 = NA, p1 = NA, alpha = ifelse(is.null(grid), 0.05, NA), beta = ifelse(is.null(grid), 0.1, NA), fullGrid = FALSE, ... )"},{"path":"https://openpharma.github.io/mtdesign/main/reference/obtainDesign.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"grid Optional. tibble created createGrid. NULL, p0, p1, alpha beta must specified createGrid called generate required grid. NULL p0, p1, alpha beta ignored p0 response rate null hypothesis p1 response rate alternate hypothesis alpha desired (one-sided) type 1 error rate beta desired type 2 error rate fullGrid full grid possible designs returned, simply optimal minimax solutions? Mander Thompson design, optimal minimax designs returned null alternate hypotheses. See Usage Notes . ... passed `createGrid` `augmentGrid`. particular mander=TRUE Mander & Thompson design mander=FALSE Simon's 2-stage design.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/obtainDesign.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"tibble created createGrid. fullGrid == FALSE table contains additional column, Criterion indicating type design. Possible values Criterion \"optimal\" \"minimax\" Simon's designs \"optimalNull\", \"optimalAlt\", \"minimaxNull\" \"minimaxAlt\" Mander & Thompson designs.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/obtainDesign.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage notes","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"grid NULL possible none candidate designs acceptable (, satisfy significance level power requirements). case fullGrid == FALSE, empty tibble returned. versbose == TRUE warning message also printed. fullGrid == TRUE full grid designs considered returned. can interrogated find optimal designs constraints - example fixed stage sizes.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/obtainDesign.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"","code":"# \\donttest{ # Standard use (Simon's 2-stage design) createGrid(p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, mander = FALSE) %>% augmentGrid(parallel = FALSE) %>% obtainDesign() #> # A tibble: 2 × 15 #> nTotal nStage1 rTotal rFutility p0 p1 Alpha Beta Type1 Type2 PETNull #> #> 1 17 9 2 0 0.05 0.25 0.05 0.2 0.0466 0.188 0.630 #> 2 16 12 2 0 0.05 0.25 0.05 0.2 0.0427 0.199 0.540 #> # ℹ 4 more variables: PETAlt , AveSizeNull , AveSizeAlt , #> # Criterion # Constrained stage sizes createGrid(p0 = 0.25, p1 = 0.45, alpha = 0.05, beta = 0.2) %>% dplyr::filter(nStage1 == 8) %>% augmentGrid(parallel = FALSE) %>% obtainDesign() #> # A tibble: 4 × 16 #> nTotal nStage1 rTotal rFutility rSuccess p0 p1 Alpha Beta Type1 Type2 #> #> 1 39 8 14 1 5 0.25 0.45 0.05 0.2 0.0430 0.196 #> 2 36 8 13 0 5 0.25 0.45 0.05 0.2 0.0482 0.184 #> 3 36 8 13 0 5 0.25 0.45 0.05 0.2 0.0482 0.184 #> 4 36 8 13 0 5 0.25 0.45 0.05 0.2 0.0482 0.184 #> # ℹ 5 more variables: PETNull , PETAlt , AveSizeNull , #> # AveSizeAlt , Criterion # }"},{"path":"https://openpharma.github.io/mtdesign/main/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://openpharma.github.io/mtdesign/main/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling `rhs(lhs)`.","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/powerPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot the power curve(s) for the given design(s) — powerPlot","title":"Plot the power curve(s) for the given design(s) — powerPlot","text":"Plot power curve(s) given design(s)","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/powerPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot the power curve(s) for the given design(s) — powerPlot","text":"","code":"powerPlot(grid, probs = seq(0, 1, 0.01))"},{"path":"https://openpharma.github.io/mtdesign/main/reference/powerPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot the power curve(s) for the given design(s) — powerPlot","text":"grid tibble containing designs plotted probs response rates rejection probabilities plotted","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/powerPlot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot the power curve(s) for the given design(s) — powerPlot","text":"ggplot object containing power curve(s)","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/powerPlot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot the power curve(s) for the given design(s) — powerPlot","text":"","code":"createGrid(p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, mander = FALSE) %>% augmentGrid(cores = 2) %>% obtainDesign() %>% powerPlot(probs = seq(0, 0.5, 0.025)) #> Warning: one argument not used by format 'Parallelisation has been requested, but the grid size [72814] is less than the minimum chunk size [1e+05]. Parallelisation will not occur' #> pkgdown 2024-10-31 15:51:49 INFO pkgdown::build_site: Parallelisation has been requested, but the grid size [72814] is less than the minimum chunk size [1e+05]. Parallelisation will not occur"},{"path":"https://openpharma.github.io/mtdesign/main/reference/searchBounds.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain default bounds for the construction of the search grid. — searchBounds","title":"Obtain default bounds for the construction of the search grid. — searchBounds","text":"formula used continuity corrected Normal approximation Fleiss et al (2003).","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/searchBounds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain default bounds for the construction of the search grid. — searchBounds","text":"","code":"searchBounds(p0, p1, alpha = 0.05, beta = 0.2, twoSided = TRUE)"},{"path":"https://openpharma.github.io/mtdesign/main/reference/searchBounds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain default bounds for the construction of the search grid. — searchBounds","text":"p0 response rate null hypothesis p1 response rate alternate hypothesis alpha desired (one-sided) type 1 error rate beta desired type 2 error rate twoSided two- one-sided significance level?","code":""},{"path":"https://openpharma.github.io/mtdesign/main/reference/searchBounds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain default bounds for the construction of the search grid. — searchBounds","text":"list three elements: \"n\" - single stage sample size Fleiss et al; \"min\" - lower bound, 0.8*n; \"max\" - upper bound, 2*n. floor() ceiling() applied appropriate.","code":""}] +[{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://openpharma.github.io/mtdesign/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://openpharma.github.io/mtdesign/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"John Kirkpatrick. Author, maintainer.","code":""},{"path":"https://openpharma.github.io/mtdesign/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Kirkpatrick J (2024). mtdesign: Mander Thompson Designs. R package version 0.1.2, https://github.com/openpharma/mtdesign.","code":"@Manual{, title = {mtdesign: Mander and Thompson Designs}, author = {John Kirkpatrick}, year = {2024}, note = {R package version 0.1.2}, url = {https://github.com/openpharma/mtdesign}, }"},{"path":[]},{"path":"https://openpharma.github.io/mtdesign/index.html","id":"introduction","dir":"","previous_headings":"","what":"Introduction","title":"Mander and Thompson Designs","text":"package mtdesign provides implementations Simon (1989) Mander & Thompson (2010). implementations Simon’s methods available - example, ph2simon function clinfun package (Seshan 2018), provide easy access non-optimal solutions way mtdesign . aware R-based implementations Mander & Thompson’s extension Simon.","code":""},{"path":"https://openpharma.github.io/mtdesign/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Mander and Thompson Designs","text":"available CRAN, can install mtdesign usual way: install.packages(\"mtdesign\") can install development version mtdesign GitHub : devtools::install_github(\"openpharma/mtdesign\")","code":""},{"path":"https://openpharma.github.io/mtdesign/index.html","id":"set-up-vignette-environment","dir":"","previous_headings":"","what":"Set up vignette environment","title":"Mander and Thompson Designs","text":"","code":"# By policy, on CRAN, use only two cores, no matter how many are available. if (requireNamespace(\"parallel\", quietly = TRUE)) { maxCores <- parallel::detectCores() maxCores <- ifelse(identical(Sys.getenv(\"NOT_CRAN\"), \"true\"), maxCores, min(maxCores, 2)) } else { maxCores <- 1 }"},{"path":"https://openpharma.github.io/mtdesign/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Mander and Thompson Designs","text":"Suppose treatments response rate less 5% interest response rate least 25% worthy development. Simon’s 2-stage design seek efficacy signal significance level 5% power 80% required. table shows optimal design requirements 0/9 2/17. expected sample size 12.0 probability early termination 63%. significance level actually achieved 4.7% power level achieved 100% - 18.8% = 81.2%. power curves designs easily plotted. Obtaining equivalent Mander & Thompson designs requires small change calls.","code":"library(mtdesign) library(knitr) library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union simonDesign <- obtainDesign(p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, mander = FALSE, parallel = FALSE) simonDesign %>% select(-Alpha, -Beta, -p0, -p1, -PETAlt, -AveSizeAlt) %>% kable(digits = c(0, 0, 0, 0, 3, 3, 2, 1, NA)) powerPlot(simonDesign) manderDesign <- obtainDesign( p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, cores = maxCores ) manderDesign %>% select(-Alpha, -Beta, -p0, -p1) %>% kable(digits = c(0, 0, 0, 0, 3, 3, 2, 2, 2, 1, NA)) powerPlot(manderDesign)"},{"path":"https://openpharma.github.io/mtdesign/index.html","id":"constrained-designs","dir":"","previous_headings":"Example","what":"Constrained designs","title":"Mander and Thompson Designs","text":"Suppose trial, whatever reason, restricted using 8 participants stage. shown , optimal Simon’s two stage design 0/9 2/17. ’s close n1 = 8, n = 16. (slightly) sub-optimal design n1 = 8, n = 16? , isn’t. close can get? Best sub-optimal design required significance level Best sub-optimal design required power choice lies design achieves required significance level power 77.1% one required power significance level 15.1%. designs accept null hypothesis responders seen first group eight participants. differ critical value end stage 2: 1 maintain power, 2 maintain significance level. power curve designs can compared globally optimal design.","code":"x <- createGrid(p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, mander = FALSE) y <- x %>% filter(nStage1 == 8, nTotal == 16) z <- y %>% obtainDesign(cores = maxCores) #> Warning: No acceptable designs were found. if (nrow(z) == 0) { print(\"No acceptable designs were found.\") } else { select(-Alpha, -Beta, -p0, -p1, -PETAlt, -AveSizeAlt) %>% z() %>% select(-Alpha, -Beta, -p0, -p1, -PETAlt, -AveSizeAlt) %>% kable(digits = c(0, 0, 0, 0, 3, 3, 2, 1, NA)) } #> [1] \"No acceptable designs were found.\" z1 <- y %>% augmentGrid() bestSize <- z1 %>% filter(Type1 < Alpha) %>% slice_min(Type2) bestSize %>% select(-Alpha, -Beta, -p0, -p1, -PETAlt, -AveSizeAlt) %>% kable( caption = \"Best sub-optimal design with required significance level\", digits = c(0, 0, 0, 0, 3, 3, 2, 1, NA) ) bestPower <- z1 %>% filter(Type2 < Beta) %>% slice_min(Type1) bestPower %>% select(-Alpha, -Beta, -p0, -p1, -PETAlt, -AveSizeAlt) %>% kable( caption = \"Best sub-optimal design with required power\", digits = c(0, 0, 0, 0, 3, 3, 2, 1, NA) ) plotData1 <- simonDesign %>% filter(Criterion == \"optimal\") %>% bind_rows(list(bestSize, bestPower)) powerPlot(plotData1)"},{"path":"https://openpharma.github.io/mtdesign/index.html","id":"package-structure","dir":"","previous_headings":"","what":"Package structure","title":"Mander and Thompson Designs","text":"mtdesign package consists three main functions: createGrid creates grid (nStage1, rFutility, nTotal rTotal Simon’s design nStage1, rFutility, rSuccess, nTotal rTotal Mander & Thompson design) brute force search required design(s) conducted augmentGridtakes grid created createGrid adds columns probability early termination, Type 1 error, Type 2 error expected sample size . obtainDesign takes augmented grid identifies optimal minimax designs","code":""},{"path":"https://openpharma.github.io/mtdesign/index.html","id":"error-and-warning-messages-and-logging","dir":"","previous_headings":"","what":"Error and warning messages and logging","title":"Mander and Thompson Designs","text":"mtdesign package supports logging via futile.logger package (Rowe 2016). functions simply report Entry Exit DEBUG level. augmentGrid function reports steps parallelisation process TRACE level.","code":""},{"path":"https://openpharma.github.io/mtdesign/index.html","id":"parallelisation","dir":"","previous_headings":"","what":"Parallelisation","title":"Mander and Thompson Designs","text":"known closed form solution obtaining solutions either Simon’s original equations Mander & Thompson’s extensions. mtdesign package uses brute force approach evaluate operating characteristics reasonable potential designs. grids can quickly become large, particularly Mander & Thompson designs. example, createGrid(0.2, 0.4, alpha=0.1, beta=0.1) creates grid almost 11 million candidate designs. mtdesign uses paralellisation attempt speed evaluation candidate designs. augmentGrid function allows users control parallelisation process: parallel parameter defaults TRUE defines whether paralellisation used. cores parameter specifies many cores used. default value, NA tells mtdesign use available (defined parallel::detectCores()), cores. minChunkSize determines smallest grid candidate designs trigger paralellisation. default value 100000. parallel package required parallelisation. parallelisation needed (ie grid size exceeds minChunkSize) requested parallel package installed, error message thrown augmentation grid stops. paralellisation requested grid contains one million rows, warning produced.","code":""},{"path":"https://openpharma.github.io/mtdesign/index.html","id":"troubleshooting","dir":"","previous_headings":"","what":"Troubleshooting","title":"Mander and Thompson Designs","text":", installing using mtdesign package, get error regarding syntax error .hpp file, similar following issue likely mismatch g++ compiler used headers supplied BH package. two solutions know : Upgrade g++ Downgrade version BH package using. appropriate package version depends version g++ compiler using.","code":".../BH/include/boost/math/tools/fraction.hpp:84:48: error: ‘long double’ is not a class, struct, or union type using value_type = typename T::value_type;"},{"path":[]},{"path":"https://openpharma.github.io/mtdesign/reference/augmentGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"Augment grid candidate designs type 1 type 2 error probabilities, expected sample sizes probabilities early termination","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/augmentGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"","code":"augmentGrid(d, parallel = TRUE, cores = NA, minChunkSize = 1e+05)"},{"path":"https://openpharma.github.io/mtdesign/reference/augmentGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"d tibble created `createGrid` parallel use parallelisation available cores number cores use parallelising. NA<\/code>, available cores requested minChunkSize minimum size grid paralellisation attempted","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/augmentGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"augmented grid tibble","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/augmentGrid.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage Notes","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"Regardless value `parallel`, parallelisation used size grid greater chunkSize<\/code>. paralellisation requested needed, exception thrown parallel package available.","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/augmentGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Augment a grid of candidate designs with type 1 and type 2 error probabilities, expected sample sizes and probabilities of early termination — augmentGrid","text":"","code":"x <- createGrid(p0 = 0.1, p1 = 0.30, alpha = 0.1, beta = 0.1, nMin = 24, nMax = 32) %>% augmentGrid(parallel = FALSE)"},{"path":"https://openpharma.github.io/mtdesign/reference/createGrid.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a grid of candidate designs — createGrid","title":"Create a grid of candidate designs — createGrid","text":"Create grid candidate designs","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/createGrid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a grid of candidate designs — createGrid","text":"","code":"createGrid( p0, p1, alpha = 0.1, beta = NA, power = ifelse(is.na(beta), 0.9, 1 - beta), nMin = NA, nMax = NA, mander = TRUE )"},{"path":"https://openpharma.github.io/mtdesign/reference/createGrid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a grid of candidate designs — createGrid","text":"p0 response rate null hypothesis p1 response rate alternate hypothesis alpha desired (one-sided) type 1 error rate beta desired type 2 error rate power alternative beta nMin lower bound search grid. NA, searchBounds called provide appropriate value nMax lower bound search grid. NA, searchBounds called provide appropriate value mander Mander & Thompson Simon's design required?","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/createGrid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a grid of candidate designs — createGrid","text":"tibble. See Usage notes list description columns.","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/createGrid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a grid of candidate designs — createGrid","text":"","code":"# Standard use for a Simon's 2-stage design x <- createGrid(p0 = 0.1, p1 = 0.5, alpha = 0.1, beta = 0.1, mander = FALSE) # Custom search bounds for a Mander & Thompson design y <- createGrid(p0 = 0.1, p1 = 0.4, alpha = 0.1, beta = 0.1, nMin = 20, nMax = 30)"},{"path":"https://openpharma.github.io/mtdesign/reference/obtainDesign.html","id":null,"dir":"Reference","previous_headings":"","what":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"obtainDesign essentially wrapper calls createGrid augmentGrid followed simple filtering candidate designs identify optimal minimax designs.","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/obtainDesign.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"","code":"obtainDesign( grid = NULL, p0 = NA, p1 = NA, alpha = ifelse(is.null(grid), 0.05, NA), beta = ifelse(is.null(grid), 0.1, NA), fullGrid = FALSE, ... )"},{"path":"https://openpharma.github.io/mtdesign/reference/obtainDesign.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"grid Optional. tibble created createGrid. NULL, p0, p1, alpha beta must specified createGrid called generate required grid. NULL p0, p1, alpha beta ignored p0 response rate null hypothesis p1 response rate alternate hypothesis alpha desired (one-sided) type 1 error rate beta desired type 2 error rate fullGrid full grid possible designs returned, simply optimal minimax solutions? Mander Thompson design, optimal minimax designs returned null alternate hypotheses. See Usage Notes . ... passed `createGrid` `augmentGrid`. particular mander=TRUE Mander & Thompson design mander=FALSE Simon's 2-stage design.","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/obtainDesign.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"tibble created createGrid. fullGrid == FALSE table contains additional column, Criterion indicating type design. Possible values Criterion \"optimal\" \"minimax\" Simon's designs \"optimalNull\", \"optimalAlt\", \"minimaxNull\" \"minimaxAlt\" Mander & Thompson designs.","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/obtainDesign.html","id":"usage-notes","dir":"Reference","previous_headings":"","what":"Usage notes","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"grid NULL possible none candidate designs acceptable (, satisfy significance level power requirements). case fullGrid == FALSE, empty tibble returned. versbose == TRUE warning message also printed. fullGrid == TRUE full grid designs considered returned. can interrogated find optimal designs constraints - example fixed stage sizes.","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/obtainDesign.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Finds optimal and minimax designs for either Simon's 2-stage or Mander & Thompson studies — obtainDesign","text":"","code":"# \\donttest{ # Standard use (Simon's 2-stage design) createGrid(p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, mander = FALSE) %>% augmentGrid(parallel = FALSE) %>% obtainDesign() #> # A tibble: 2 × 15 #> nTotal nStage1 rTotal rFutility p0 p1 Alpha Beta Type1 Type2 PETNull #> #> 1 17 9 2 0 0.05 0.25 0.05 0.2 0.0466 0.188 0.630 #> 2 16 12 2 0 0.05 0.25 0.05 0.2 0.0427 0.199 0.540 #> # ℹ 4 more variables: PETAlt , AveSizeNull , AveSizeAlt , #> # Criterion # Constrained stage sizes createGrid(p0 = 0.25, p1 = 0.45, alpha = 0.05, beta = 0.2) %>% dplyr::filter(nStage1 == 8) %>% augmentGrid(parallel = FALSE) %>% obtainDesign() #> # A tibble: 4 × 16 #> nTotal nStage1 rTotal rFutility rSuccess p0 p1 Alpha Beta Type1 Type2 #> #> 1 39 8 14 1 5 0.25 0.45 0.05 0.2 0.0430 0.196 #> 2 36 8 13 0 5 0.25 0.45 0.05 0.2 0.0482 0.184 #> 3 36 8 13 0 5 0.25 0.45 0.05 0.2 0.0482 0.184 #> 4 36 8 13 0 5 0.25 0.45 0.05 0.2 0.0482 0.184 #> # ℹ 5 more variables: PETNull , PETAlt , AveSizeNull , #> # AveSizeAlt , Criterion # }"},{"path":"https://openpharma.github.io/mtdesign/reference/pipe.html","id":null,"dir":"Reference","previous_headings":"","what":"Pipe operator — %>%","title":"Pipe operator — %>%","text":"See magrittr::%>% details.","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/pipe.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Pipe operator — %>%","text":"","code":"lhs %>% rhs"},{"path":"https://openpharma.github.io/mtdesign/reference/pipe.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Pipe operator — %>%","text":"lhs value magrittr placeholder. rhs function call using magrittr semantics.","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/pipe.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Pipe operator — %>%","text":"result calling `rhs(lhs)`.","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/powerPlot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot the power curve(s) for the given design(s) — powerPlot","title":"Plot the power curve(s) for the given design(s) — powerPlot","text":"Plot power curve(s) given design(s)","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/powerPlot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot the power curve(s) for the given design(s) — powerPlot","text":"","code":"powerPlot(grid, probs = seq(0, 1, 0.01))"},{"path":"https://openpharma.github.io/mtdesign/reference/powerPlot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot the power curve(s) for the given design(s) — powerPlot","text":"grid tibble containing designs plotted probs response rates rejection probabilities plotted","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/powerPlot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Plot the power curve(s) for the given design(s) — powerPlot","text":"ggplot object containing power curve(s)","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/powerPlot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot the power curve(s) for the given design(s) — powerPlot","text":"","code":"createGrid(p0 = 0.05, p1 = 0.25, alpha = 0.05, beta = 0.2, mander = FALSE) %>% augmentGrid(cores = 2) %>% obtainDesign() %>% powerPlot(probs = seq(0, 0.5, 0.025)) #> Warning: one argument not used by format 'Parallelisation has been requested, but the grid size [72814] is less than the minimum chunk size [1e+05]. Parallelisation will not occur' #> pkgdown 2024-11-01 13:52:51 INFO pkgdown::build_site: Parallelisation has been requested, but the grid size [72814] is less than the minimum chunk size [1e+05]. Parallelisation will not occur"},{"path":"https://openpharma.github.io/mtdesign/reference/searchBounds.html","id":null,"dir":"Reference","previous_headings":"","what":"Obtain default bounds for the construction of the search grid. — searchBounds","title":"Obtain default bounds for the construction of the search grid. — searchBounds","text":"formula used continuity corrected Normal approximation Fleiss et al (2003).","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/searchBounds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Obtain default bounds for the construction of the search grid. — searchBounds","text":"","code":"searchBounds(p0, p1, alpha = 0.05, beta = 0.2, twoSided = TRUE)"},{"path":"https://openpharma.github.io/mtdesign/reference/searchBounds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Obtain default bounds for the construction of the search grid. — searchBounds","text":"p0 response rate null hypothesis p1 response rate alternate hypothesis alpha desired (one-sided) type 1 error rate beta desired type 2 error rate twoSided two- one-sided significance level?","code":""},{"path":"https://openpharma.github.io/mtdesign/reference/searchBounds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Obtain default bounds for the construction of the search grid. — searchBounds","text":"list three elements: \"n\" - single stage sample size Fleiss et al; \"min\" - lower bound, 0.8*n; \"max\" - upper bound, 2*n. floor() ceiling() applied appropriate.","code":""}]