Package 'ierd'

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

Help Index


Density of the Inverted Exponentiated Rayleigh Distribution

Description

This function computes the probability density function (PDF) of the Inverted Exponentiated Rayleigh distribution.

Usage

dierd(x, shape, scale)

Arguments

x

A numeric vector of quantiles.

shape

A strictly positive numeric value for the shape parameter (α\alpha).

scale

A strictly positive numeric value for the scale parameter (β\beta).

Details

The probability density function is mathematically defined as:

f(x)=2αβx3exp(β/x2)(1exp(β/x2))α1f(x) = 2 \alpha \beta x^{-3} \exp(-\beta / x^2) (1 - \exp(-\beta / x^2))^{\alpha - 1}

for x>0x > 0, where α\alpha is the shape parameter and β\beta is the scale parameter.

Value

A numeric vector of density values evaluated at x.

Examples

# Compute the density at various values of x
dierd(x = c(0.5, 1, 1.5, 2), shape = 2, scale = 1)

Cumulative Distribution Function of the Inverted Exponentiated Rayleigh Distribution

Description

This function computes the Cumulative Distribution Function (CDF) of the Inverted Exponentiated Rayleigh distribution.

Usage

pierd(t, shape, scale)

Arguments

t

A numeric vector of quantiles.

shape

A strictly positive numeric value for the shape parameter (α\alpha).

scale

A strictly positive numeric value for the scale parameter (β\beta).

Details

The cumulative distribution function is mathematically defined as:

F(t)=1(1exp(β/t2))αF(t) = 1 - (1 - \exp(-\beta / t^2))^\alpha

for t>0t > 0, where α\alpha is the shape parameter and β\beta is the scale parameter.

Value

A numeric vector of cumulative probabilities evaluated at t.

Examples

# Compute the cumulative probabilities at various values of t
pierd(t = c(0.5, 1, 1.5, 2), shape = 2, scale = 1)

Plot Multiple Inverted Exponentiated Rayleigh Densities

Description

This function creates a ggplot2 visualization comparing the dierd PDF across combinations of shape and scale parameters.

Usage

plot_dierd(shape, scale, lower = 0.01, upper = 5, paired = FALSE)

Arguments

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).

Value

A ggplot object showing the density curves.

Examples

# 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)

Plot Multiple Inverted Exponentiated Rayleigh CDFs

Description

This function creates a ggplot2 visualization of the pierd CDF across combinations of shape and scale parameters.

Usage

plot_pierd(shape, scale, lower = 0.01, upper = 7.5, paired = FALSE)

Arguments

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).

Value

A ggplot object showing the cumulative distribution curves.

Examples

# 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)

Quantile Function of the Inverted Exponentiated Rayleigh Distribution

Description

This function computes the quantile function (inverse CDF) of the Inverted Exponentiated Rayleigh distribution.

Usage

qierd(p, shape, scale)

Arguments

p

A numeric vector of probabilities.

shape

A strictly positive numeric value for the shape parameter (α\alpha).

scale

A strictly positive numeric value for the scale parameter (β\beta).

Details

The quantile function is mathematically defined as:

Q(p)=βlog(1(1p)1/α)Q(p) = \sqrt{\frac{-\beta}{\log(1 - (1 - p)^{1/\alpha})}}

for 0p10 \le p \le 1, where α\alpha is the shape parameter and β\beta is the scale parameter.

Value

A numeric vector of quantiles evaluated at p.

Examples

# Compute the quantiles at various probability values (e.g., quartiles)
qierd(p = c(0.25, 0.5, 0.75), shape = 2, scale = 1)

Random Numbers from the Inverted Exponentiated Rayleigh Distribution

Description

This function generates random numbers from an Inverted Exponentiated Rayleigh distribution using inverse transform sampling.

Usage

rierd(n, shape, scale)

Arguments

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.

Value

A numeric vector of length n containing the generated random numbers.

Examples

# Generate 10 random numbers with shape = 2 and scale = 1
rierd(n = 10, shape = 2, scale = 1)