MyNixOS website logo
Description

Cobin and Micobin Regression Models for Continuous Proportional Data.

Provides functions for cobin and micobin regression models, a new family of generalized linear models for continuous proportional data (Y in the closed unit interval [0, 1]). It also includes an exact, efficient sampler for the Kolmogorov-Gamma random variable. For details, see Lee et al. (2025+) <doi:10.48550/arXiv.2504.15269>.

cobin: R package for cobin and micobin regression models

Cobin and micobin regression models are scalable and robust alternative to beta regression model for continuous proportional data. See the following paper for more details:

Lee, C. J., Dahl, B. K., Ovaskainen, O., Dunson, D. B. (2025). Scalable and robust regression models for continuous proportional data. arXiv preprint arXIV:2504.15269 https://arxiv.org/abs/2504.15269

A dedicated Github repository for reproducing the analysis in the paper is available at https://github.com/changwoo-lee/cobin-reproduce. This R package repository contains the functions for the cobin and micobin regression models, as well as sampler for Kolmogorov-Gamma random variables.

Install the package from GitHub:

# install.packages("devtools")
devtools::install_github("changwoo-lee/cobin")

Glossaries: GLM: generalized linear model; GLMM: generalized linear mixed model; GP: Gaussian process; NNGP: nearest neighbor Gaussian process; cobin: continuous binomial; micobin: mixture of continuous binomial;

vignette

Comparison of cobin and beta density

Comparison of micobin and beta density

Please see MMI data analysis code corresponding to the Section 6 of the paper(https://arxiv.org/abs/2504.15269). More detailed examples TBA.

Code structure

Basic functions

  • cobin.R:
    • dcobin(x, theta, lambda): Density of $\mathrm{cobin}(\theta, \lambda^{-1})$ at x
    • rcobin(n, theta, lambda): Random variate generation from $\mathrm{cobin}(\theta, \lambda^{-1})$
  • micobin.R:
    • dmicobin(x, theta, psi): Density of $\mathrm{micobin}(\theta, \psi)$ at x
    • rmicobin(n, theta, psi): Random variate generation from $\mathrm{micobin}(\theta, \psi)$

Cobin / Micobin regression (Bayesian, cobit link)

  • cobinreg.R:
    • cobinreg(): fit Bayesian cobin GLM or GLMM
    • └── fit_cobin_fixedeffect.R: backend function for cobin GLM
    • └── fit_cobin_mixedeffect.R: backend function for cobin GLMM
  • micobinreg.R:
    • micobinreg(): fit Bayesian micobin GLM or GLMM
    • └── fit_micobin_fixedeffect.R: backend function for micobin GLM
    • └── fit_micobin_mixedeffect.R: backend function for micobin GLMM

Spatial cobin / micobin regression (Bayesian, cobit link)

  • spcobinreg.R:
    • cobinreg(): fit spatial cobin regresson
    • └── fit_cobin_spatial.R: backend function with GP random effect
    • └── fit_cobin_spatial_NNGP.R: backend function with NNGP random effect
  • spmicobinreg.R:
    • micobinreg(): fit Bayesian cobin GLM or GLMM
    • └── fit_micobin_spatial.R: backend function with GP random effect
    • └── fit_micobin_spatial_NNGP.R: backend function with NNGP random effect

Helper functions

  • CB.R:
    • qcb(), rcb(): quantile and random variate generation of continuous Bernoulli
  • IH.R:
    • dIH(): density of Irwin-Hall distribution
  • varfunctions.R: collection of functions related to variance function of cobin, with numerically stable computation
    • bft(): $B(x) = \log((\exp(x)-1)/x)$, cumulant (log partition) function
    • bftprime(): $B'(x) = 1/(1-\exp(-x))-1/x$, corresponding to inverse of cobit link function
    • bftprimeprime(), bftprimeprimeprime(): $B''(x)$ and $B'''(x)$
    • bftprimeinv(): inverse of $B'(x)$, corresponding to cobit link function
    • Vft(): $B''((B')^{-1}(\mu))$, variance function of cobin
  • cobinfamily.R:
    • cobinfamily(): a list of functions and expressions needed to fit cobin GLM

cobin regression (non-Bayesian)

  • glm.cobin.R:
    • glm.cobin(): fit cobin GLM using iteratively reweighted least squares (stats::glm.fit). Supports link functions “cobit”, “logit”, “probit”, “cloglog”, “cauchit”.
Metadata

Version

1.0.1.3

License

Unknown

Platforms (76)

    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-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • 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-linux
  • 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