| Title: | Inverted Exponentiated Rayleigh Distribution Tools |
|---|---|
| Description: | Provides the density, distribution function, quantile function, random generation, and visualization tools for the Inverted Exponentiated Rayleigh Distribution. |
| Authors: | Sudipta Pal [aut, cre] |
| Maintainer: | Sudipta Pal <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-06-17 09:24:21 UTC |
| Source: | https://github.com/sudiptapal0709/ierd |
This function computes the probability density function (PDF) of the Inverted Exponentiated Rayleigh distribution.
dierd(x, shape, scale)dierd(x, shape, scale)
x |
A numeric vector of quantiles. |
shape |
A strictly positive numeric value for the shape parameter ( |
scale |
A strictly positive numeric value for the scale parameter ( |
The probability density function is mathematically defined as:
for , where is the shape parameter and is the scale parameter.
A numeric vector of density values evaluated at x.
# Compute the density at various values of x dierd(x = c(0.5, 1, 1.5, 2), shape = 2, scale = 1)# Compute the density at various values of x dierd(x = c(0.5, 1, 1.5, 2), shape = 2, scale = 1)
This function computes the Cumulative Distribution Function (CDF) of the Inverted Exponentiated Rayleigh distribution.
pierd(t, shape, scale)pierd(t, shape, scale)
t |
A numeric vector of quantiles. |
shape |
A strictly positive numeric value for the shape parameter ( |
scale |
A strictly positive numeric value for the scale parameter ( |
The cumulative distribution function is mathematically defined as:
for , where is the shape parameter and is the scale parameter.
A numeric vector of cumulative probabilities evaluated at t.
# Compute the cumulative probabilities at various values of t pierd(t = c(0.5, 1, 1.5, 2), shape = 2, scale = 1)# Compute the cumulative probabilities at various values of t pierd(t = c(0.5, 1, 1.5, 2), shape = 2, scale = 1)
This function creates a ggplot2 visualization comparing the dierd PDF across combinations of shape and scale parameters.
plot_dierd(shape, scale, lower = 0.01, upper = 5, paired = FALSE)plot_dierd(shape, scale, lower = 0.01, upper = 5, paired = FALSE)
shape |
A numeric vector of strictly positive shape parameters. |
scale |
A numeric vector of strictly positive scale parameters. |
lower |
A numeric value for the lower bound of the x-axis (default is 0.01). |
upper |
A numeric value for the upper bound of the x-axis (default is 5). |
paired |
Logical. If FALSE (default), creates a full grid of all possible shape and scale combinations. If TRUE, pairs the shape and scale vectors element-by-element (vectors must be the same length). |
A ggplot object showing the density curves.
# Full grid: 2 shapes * 2 scales = 4 curves plot_dierd(shape = c(1, 2), scale = c(1, 2)) # Paired: 2 specific combinations = 2 curves plot_dierd(shape = c(1, 2), scale = c(1, 2), paired = TRUE)# Full grid: 2 shapes * 2 scales = 4 curves plot_dierd(shape = c(1, 2), scale = c(1, 2)) # Paired: 2 specific combinations = 2 curves plot_dierd(shape = c(1, 2), scale = c(1, 2), paired = TRUE)
This function creates a ggplot2 visualization of the pierd CDF across combinations of shape and scale parameters.
plot_pierd(shape, scale, lower = 0.01, upper = 7.5, paired = FALSE)plot_pierd(shape, scale, lower = 0.01, upper = 7.5, paired = FALSE)
shape |
A numeric vector of strictly positive shape parameters. |
scale |
A numeric vector of strictly positive scale parameters. |
lower |
A numeric value for the lower bound of the x-axis (default is 0.01). |
upper |
A numeric value for the upper bound of the x-axis (default is 7.5). |
paired |
Logical. If FALSE (default), creates a full grid of all possible shape and scale combinations. If TRUE, pairs the shape and scale vectors element-by-element (vectors must be the same length). |
A ggplot object showing the cumulative distribution curves.
# Full grid: 2 shapes * 2 scales = 4 curves plot_pierd(shape = c(1, 2), scale = c(1, 2)) # Paired: 2 specific combinations = 2 curves plot_pierd(shape = c(1, 2), scale = c(1, 2), paired = TRUE)# Full grid: 2 shapes * 2 scales = 4 curves plot_pierd(shape = c(1, 2), scale = c(1, 2)) # Paired: 2 specific combinations = 2 curves plot_pierd(shape = c(1, 2), scale = c(1, 2), paired = TRUE)
This function computes the quantile function (inverse CDF) of the Inverted Exponentiated Rayleigh distribution.
qierd(p, shape, scale)qierd(p, shape, scale)
p |
A numeric vector of probabilities. |
shape |
A strictly positive numeric value for the shape parameter ( |
scale |
A strictly positive numeric value for the scale parameter ( |
The quantile function is mathematically defined as:
for , where is the shape parameter and is the scale parameter.
A numeric vector of quantiles evaluated at p.
# Compute the quantiles at various probability values (e.g., quartiles) qierd(p = c(0.25, 0.5, 0.75), shape = 2, scale = 1)# Compute the quantiles at various probability values (e.g., quartiles) qierd(p = c(0.25, 0.5, 0.75), shape = 2, scale = 1)
This function generates random numbers from an Inverted Exponentiated Rayleigh distribution using inverse transform sampling.
rierd(n, shape, scale)rierd(n, shape, scale)
n |
An integer specifying the number of random values to return. |
shape |
A strictly positive numeric value for the shape parameter. |
scale |
A strictly positive numeric value for the scale parameter. |
A numeric vector of length n containing the generated random numbers.
# Generate 10 random numbers with shape = 2 and scale = 1 rierd(n = 10, shape = 2, scale = 1)# Generate 10 random numbers with shape = 2 and scale = 1 rierd(n = 10, shape = 2, scale = 1)