MyNixOS website logo
Description

Sample Size Calculation in Reversible Catalytic Models.

Sample size and confidence interval calculations in reversible catalytic models, with applications in malaria research. Further details can be found in the paper by Sepúlveda and Drakeley (2015, <doi:10.1186/s12936-015-0661-z>).

RCMsize

The goal of RCMsize is to calculate the sample size required for studies where the main outcome measure is the seroconversion rate (SCR). It provides tools to compute the probability of an individual being seropositive, given specific parameters such as the seroconversion rate (SCR) , the seroreversion rate (SRR), and the individual's age, using a reversible catalytic model. Additionally, the package allows for the calculation of seroprevalence (SP) and its corresponding confidence interval, as well as the confidence interval for the seroconversion rate (SCR).

Installation

To install the RCMsize package from GitHub use one of the following commands:

devtools::install_github("https://github.com/marciagraca/RCMsize")

remotes::install_github("https://github.com/marciagraca/RCMsize")

After the installation is complete, you can load the RCMsize package into your R session by running:

library(RCMsize)

Example

In this example we calculate the required sample size so that the relative width of the confidence interval for the seroconversion rate (SCR) is equal to a specified value (RL). The function calculates the necessary sample size by iteratively adjusting the sample size until the confidence interval for SCR meets the desired width criteria. This calculation is based on the seroprevalence, confidence intervals for seroprevalence, and the seroconversion rate.

Parameters:

  • SCR: The seroconversion rate.
  • RL: The desired relative width for the confidence interval width for the seroconversion rate.
  • SRR: The seroreversion rate.
  • ages: A vector representing the distribution of ages in the population.
  • A_max: The maximum age in the population.
  • limits: The lower and upper limits for the SCR.
  • max_iter: The maximum number of iterations for adjusting the sample size (default is 10000).
  • conf.level: The confidence level for the confidence interval (default is 0.95).
  • method: The method for calculating the confidence interval for seroprevalence, default is "asymptotic".

Example:

A_max <- 80
age_distribution <- rep(1 / A_max, A_max)
sample_s(0.03, 1, 0.01, age_distribution, A_max, limits = c(0, 1))

References

For more information on reversible catalytic models, please refer to the following article.

Metadata

Version

1.0.0

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • 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