MyNixOS website logo
Description

Integration-Based Coefficients of Variance.

Estimate coefficient of variance percent (CV%) for any arbitrary distribution, including some built-in estimates for commonly-used transformations in pharmacometrics. Methods are described in various sources, but applied here as summarized in: Prybylski, (2024) <doi:10.1007/s40262-023-01343-2>.

pmxcv

This package is intended to provide easy access to methods of reporting CV% in non-lognormal, non-normal distributions. Often in pharmacometric literature, CV% is only reported for lognormal variability (or treated as lognormal), favoring reporting of the harder-to-interpret variance parameter; this package attempts to provide an alternative approach.

Installation

You can install the development version of pmxcv like so:

devtools::install_github("pfizer-rd/pmxcv")

Example

Example of a typical use case:

library(pmxcv)

## Parameters from NONMEM (etc)
theta_bio <- 0.689
omega_bio <- 1.2

# Representation of bioavailability calculation in NONMEM syntax:L
# LOGITF1 = LOG( THETA(BIO) ) - LOG( 1 - THETA(BIO) )
# F1 = 1/( 1 + 1/EXP( LOGITF1 + ETA(BIO) )

## Numeric parameter variability
eta_sample <- rnorm(10^9, sd=sqrt(omega_bio))
logit_theta <- log(theta_bio) - log( 1 - theta_bio )
indiv_bios <- 1 / ( 1 + 1/exp( logit_theta + eta_sample ) )
expected_cv <- 100*sd(indiv_bios)/mean(indiv_bios)
expected_cv
#> [1] 31.39837

## Lognormal reported CV% (erroneous)
bio_cv_lnorm <- 100*sqrt(exp(omega_bio) - 1)
bio_cv_lnorm
#> [1] 152.3193

## Logitnormal reported CV%
bio_cv_lgtnorm <- dist.intcv("logit", u=theta_bio, v=omega_bio)
bio_cv_lgtnorm # should be approximately equal to numeric
#> [1] 31.39758
Metadata

Version

0.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