
An R-package for the Nakagami
distribution.
Use the following command from inside R:
# install.packages("devtools")
devtools::install_github("JonasMoss/nakagami")The density function is dnaka, the probability
distribution is pnaka, the quantile function is
qnaka and random deviate generator is rnaka.
Use them just like the *gamma functions in the
stats package.
set.seed(313)
x = seq(0, 3, by = 0.01)
hist(nakagami::rnaka(10^5, shape = 4, scale = 2), freq = FALSE, breaks = "FD")
lines(x, nakagami::dnaka(x, shape = 4, scale = 2), type = "l", lwd = 2)
If X has a Nakagami distribution with parameters
shape and scale, then X^2 has a
Gamma distribution with the same shape and
rate = shape / scale. The Nakagami scale is
therefore E[X^2], rather than the Gamma scale
parameter.
If you encounter a bug, have a feature request or need some help, open a Github issue.
This project follows a Contributor Code of Conduct.