nakagami

R build status Project Status: Active – The project has reached a stable, usable state and is being actively developed. CRAN_Status_Badge

Overview

An R-package for the Nakagami distribution.

Installation

Use the following command from inside R:

# install.packages("devtools")
devtools::install_github("JonasMoss/nakagami")

Usage

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)

Parameterization

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.

How to Contribute or Get Help

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.

References