Package {nakagami}


Type: Package
Title: Functions for the Nakagami Distribution
Version: 1.2.0
Description: Density, distribution function, quantile function and random generation for the Nakagami distribution of Nakagami (1960) <doi:10.1016/B978-0-08-009306-2.50005-4>.
License: MIT + file LICENSE
Encoding: UTF-8
Suggests: testthat, knitr, rmarkdown
URL: https://github.com/JonasMoss/nakagami
BugReports: https://github.com/JonasMoss/nakagami/issues
Config/roxygen2/version: 8.0.0
NeedsCompilation: no
Packaged: 2026-10-28 18:11:44 UTC; jonas
Author: Jonas Moss ORCID iD [aut, cre]
Maintainer: Jonas Moss <jonas.gjertsen@gmail.com>
Repository: CRAN
Date/Publication: 2026-10-28 20:10:02 UTC

The Nakagami Density

Description

Density, distribution function, quantile function and random generation for the Nakagami distribution with parameters shape and scale.

Usage

dnaka(x, shape, scale, log = FALSE)

pnaka(q, shape, scale, lower.tail = TRUE, log.p = FALSE)

qnaka(p, shape, scale, lower.tail = TRUE, log.p = FALSE)

rnaka(n, shape, scale)

Arguments

x, q

vector of quantiles.

shape

vector of positive, finite shape parameters.

scale

vector of positive, finite scale parameters.

log

logical; if TRUE, the density is returned on the log scale.

lower.tail

logical; if TRUE (default), probabilities are P[X \le x] otherwise, P[X > x].

log.p

logical; if TRUE, probabilities are given on the log scale.

p

vector of probabilities.

n

non-negative integer number of observations. If length(n) > 1, the length is taken to be the number required.

Details

The Nakagami distribution (Nakagami, 1960) with shape m and scale \Omega has density

2m^m/{\Gamma(m)\Omega^m} x^(2m-1)e^(-m/\Omega x^2)

for x \ge 0, m > 0 and \Omega > 0.

If Y is Gamma distributed with shape = m and rate = m/\Omega then X = \sqrt Y is Nakagami distributed with shape = m and scale = \Omega.

Sometimes, specifically in radio channels modeling, the parameter m is constrained to m \ge 1/2, but the density is defined for any m > 0 (Kolar et al., 2004).

Value

dnaka gives the density, pnaka gives the distribution function, qnaka gives the quantile function and rnaka generates random deviates.

The length of the result is determined by n for rnaka, and is the maximum of the lengths of the numerical arguments for the other functions.

The numerical arguments other than n are recycled to the length of the result. A zero-length numerical argument gives a zero-length result for dnaka, pnaka and qnaka.

References

Nakagami, N. 1960. "The M-Distribution, a General Formula of Intensity of Rapid Fading." In Statistical Methods in Radio Wave Propagation: Proceedings of a Symposium Held at the University of California, edited by William C. Hoffman, 3-36. Permagon Press.

Kolar, R., Jirik, R., & Jan, J. (2004). Estimator comparison of the Nakagami-m parameter and its application in echocardiography. Radioengineering, 13(1), 8-12.

See Also

The Gamma distribution is closely related to the Nakagami distribution.