MyNixOS website logo
Description

Bayesian Assurance Computation.

Computes Bayesian assurance under various settings characterized by different assumptions and objectives, including precision-based conditions, credible intervals, and goal functions. All simulation-based functions included in this package rely on a two-stage Bayesian method that assigns two distinct priors to evaluate the probability of observing a positive outcome, which addresses subtle limitations that take place when using the standard single-prior approach. For more information, please refer to Pan and Banerjee (2021) <arXiv:2112.03509>.

bayesassurance R package

This R package offers a constructive set of simulation-based functions used for determining sample size and assurance in various settings. We hope these functions will be useful for addressing a wide range of clinical trial study design problems.

Setup Instructions

To install the bayesassurance package in R, there are several ways to compile the package from source as the package is not yet available on CRAN.

Directly From Github (Mac/Windows)

  1. Open R Studio.
  2. Make sure devtools is installed and loaded. If not, run install.packages("devtools") and load the package using library(devtools) once installation is complete.
  3. Install the bayesassurance package directly through Github by running devtools::install_github("jpan928/bayesassurance_rpackage"). You may be asked to install Rtools on a Windows machine.
  4. If prompted with "These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?", type "1" and press Enter.
  5. Load package using library(bayesassurance) and start using package normally.

Using tar.gz File

Alternatively, you can build the package using the tar.gz file.

Mac

Within R Studio

  1. Download the bayesassurance_0.1.0.tar.gz file.
  2. Open R Studio.
  3. In the R prompt, navigate to where this file is stored using setwd("your/filepath/here").
  4. Run install.packages("bayesassurance_0.1.0.tar.gz", repos = NULL, type = "source").
  5. Load package using library(bayesassurance) and start using package normally.

Windows

Within R Studio

  1. Download the bayesassurance_0.1.0.tar.gz file.
  2. Open R Studio.
  3. In the R prompt, navigate to where this file is stored using setwd("your/filepath/here").
  4. Run install.packages("bayesassurance_0.1.0.tar.gz", repos = NULL, type = "source"). You may be asked to install Rtools.
  5. Load package using library(bayesassurance) and start using package normally.

Within Command Prompt

  1. Download the bayesassurance_0.1.0.tar.gz file.
  2. Open command prompt.
  3. Identify path of the folder to where R is installed and run PATH <your/filepath/here>. An example of this file path is C:\Program Files\R\R-4.1.3\bin\x64.
  4. On the same command prompt, navigate to the directory containing bayesassurance_0.1.0.tar.gz.
  5. Enter R CMD INSTALL bayesassurance_0.1.0.tar.gz to install the package.
  6. Open R Studio and run library(bayesassurance) and start using package normally.

Replication Materials

For JSS reviewers, R scripts containing the necessary code to reproduce figures and examples in the manuscript can be found under Replication_Material. Please refer to the main script file, replication_script.R, and work through the examples in chronological order. The script includes all worked out examples and figures in the order in which they appear in the manuscript. It will also point you to the supplementary R Markdown files (fig7_replication.Rmd, fig9_replication.Rmd, and fig10_replication.Rmd) where appropriate.

Vignettes

Vignettes are currently undergoing revisions and will be available soon.

Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows