mhn: The Modified Half-Normal Distribution

Provides density, distribution, quantile, and random generation functions for the Modified Half-Normal (MHN) distribution, along with moments, mode, and the Fox-Wright Psi function used as the normalizing constant. The MHN distribution arises as a conditional posterior in Bayesian MCMC and generalizes the half-normal, truncated normal, and square-root gamma distributions. Implements efficient sampling via the Sun, Kong & Pal (2023) <doi:10.1080/03610926.2021.1934700> algorithms and the Gao & Wang (2025) <doi:10.1080/03610918.2025.2524551> RTDR method.

Version: 0.1.0
Depends: R (≥ 4.0.0)
Imports: stats, Rcpp (≥ 1.0.7)
LinkingTo: Rcpp, BH (≥ 1.78.0-0)
Suggests: testthat (≥ 3.0.0), knitr, rmarkdown, bench, Rmpfr
Published: 2026-05-27
DOI: 10.32614/CRAN.package.mhn (may not be active yet)
Author: Tomotaka Momozaki [aut, cre]
Maintainer: Tomotaka Momozaki <momozaki.stat at gmail.com>
BugReports: https://github.com/t-momozaki/mhn/issues
License: MIT + file LICENSE
URL: https://github.com/t-momozaki/mhn, https://t-momozaki.github.io/mhn/
NeedsCompilation: yes
SystemRequirements: C++17
Citation: mhn citation info
Materials: README, NEWS
CRAN checks: mhn results

Documentation:

Reference manual: mhn.html , mhn.pdf
Vignettes: Introduction to the mhn Package (source, R code)
Theoretical background of the mhn package (source, R code)

Downloads:

Package source: mhn_0.1.0.tar.gz
Windows binaries: r-devel: not available, r-release: mhn_0.1.0.zip, r-oldrel: mhn_0.1.0.zip
macOS binaries: r-release (arm64): mhn_0.1.0.tgz, r-oldrel (arm64): mhn_0.1.0.tgz, r-release (x86_64): mhn_0.1.0.tgz, r-oldrel (x86_64): mhn_0.1.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=mhn to link to this page.