| Title: | Computation of PTLENKies Distribution Properties |
|---|---|
| Description: | Implements statistical tools for analyzing, simulating, and computing properties of the Power Topp Leone Exponential Negative Kies Burr (PTLENKBurr). See Atchadé M, Otodji T, and Djibril A (2024) <doi:10.1063/5.0179458> and Atchadé M, Otodji T, Djibril A, and N'bouké M (2023) <doi:10.1515/phys-2023-0151> for details. |
| Authors: | Mintodê Nicodème Atchadé [aut], Théophile Otodji [aut, cre] |
| Maintainer: | Théophile Otodji <[email protected]> |
| License: | GPL-2 |
| Version: | 0.1.0 |
| Built: | 2026-10-11 20:51:58 UTC |
| Source: | https://github.com/otodji/ptlenkies |
This function calculates the Cumulative Distribution Function (CDF) of the PTLENKBurr distribution.
C_PTLENKBurr(x, m, n, p, lambda, beta, c, k)C_PTLENKBurr(x, m, n, p, lambda, beta, c, k)
x |
Value or vector of positive values up to which to calculate the CDF. |
m |
Parameter m of the distribution (m > 0). |
n |
Parameter n of the distribution (n > 0). |
p |
Parameter p of the distribution (p > 0). |
lambda |
Parameter lambda of the distribution (lambda > 0). |
beta |
Parameter beta of the distribution (beta > 0). |
c |
Parameter c of the Burr XII baseline component (c > 0). |
k |
Parameter k of the Burr XII baseline component (k > 0). |
It takes parameters x, m, n, p, lambda, beta, c, and k, and returns the CDF value at x based on these parameters.
The Cumulative Distribution Function (CDF) of the PTLENKBurr distribution is defined as:
where
and , .
A numeric vector containing the values of the CDF evaluated at x.
C_PTLENKBurr( x = c(0.5, 1.0, 1.5), m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 )C_PTLENKBurr( x = c(0.5, 1.0, 1.5), m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 )
Estimates the parameters of the Power Transformed Lindley Extended Modified
Kies Burr XII (PTLENKBurr) distribution using maximum likelihood estimation (MLE)
via constrained optimization with nlminb.
E_PTLENKBurr(data, start_params = NULL, lower = 1e-05)E_PTLENKBurr(data, start_params = NULL, lower = 1e-05)
data |
Numeric vector of positive observations. |
start_params |
Optional numeric vector of length 7 containing initial parameter values for
|
lower |
Lower bounds for parameters. Default is |
Optimization is performed using nlminb. Infeasible iterations
returning non-positive densities, NA, or NaN values are assigned a high penalty.
A named numeric vector of estimated parameters: m, n, p,
lambda, beta, c, and k.
data_sample <- c(0.5, 1.2, 0.8, 2.1, 0.3, 1.5, 0.9) E_PTLENKBurr(data_sample)data_sample <- c(0.5, 1.2, 0.8, 2.1, 0.3, 1.5, 0.9) E_PTLENKBurr(data_sample)
The dataset contains observations collected at the UK National Physical Laboratory regarding the breaking strengths of 1.5 cm glass fibers, previously reported in Atchade (2023).
data(GlassFibers)data(GlassFibers)
A numeric vector of breaking strengths.
This dataset contains measurements corresponding to the breaking strengths of 1.5 cm glass fibers. The data are presented as a numeric vector.
Atchade, N. (2023). Statistical modeling of lifetime data and probability distributions.
This function calculates the Probability Density Function (PDF) of the PTLENKBurr distribution.
P_PTLENKBurr(x, m, n, p, lambda, beta, c, k)P_PTLENKBurr(x, m, n, p, lambda, beta, c, k)
x |
Value or vector of positive values to evaluate the PDF at. |
m |
Parameter m of the distribution (m > 0). |
n |
Parameter n of the distribution (n > 0). |
p |
Parameter p of the distribution (p > 0). |
lambda |
Parameter lambda of the distribution (lambda > 0). |
beta |
Parameter beta of the distribution (beta > 0). |
c |
Parameter c of the Burr XII baseline component (c > 0). |
k |
Parameter k of the Burr XII baseline component (k > 0). |
where
and , .
A numeric vector containing the values of the PDF evaluated at x.
P_PTLENKBurr( x = c(0.5, 1.0, 1.5), m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 )P_PTLENKBurr( x = c(0.5, 1.0, 1.5), m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 )
Generates an enhanced plot of the Cumulative Distribution Function (CDF) of the PTLENKBurr distribution over [0, +Inf), automatically calculating and displaying the numerical median.
Plot_CPTLENKBurr( m, n, p, lambda, beta, c, k, max_x = NULL, show_median = TRUE, col_line = "deepskyblue4", col_median = "firebrick3", legend_pos = "right", ... )Plot_CPTLENKBurr( m, n, p, lambda, beta, c, k, max_x = NULL, show_median = TRUE, col_line = "deepskyblue4", col_median = "firebrick3", legend_pos = "right", ... )
m |
Parameter m of the distribution (m > 0). |
n |
Parameter n of the distribution (n > 0). |
p |
Parameter p of the distribution (p > 0). |
lambda |
Parameter lambda of the distribution (lambda > 0). |
beta |
Parameter beta of the distribution (beta > 0). |
c |
Parameter c of the Burr XII baseline component (c > 0). |
k |
Parameter k of the Burr XII baseline component (k > 0). |
max_x |
Optional maximum x-axis value. If NULL (default), it is automatically computed using the CDF. |
show_median |
Logical. If TRUE (default), calculates and plots the median. |
col_line |
Color of the CDF curve. Default is |
col_median |
Color of the median lines and point. Default is |
legend_pos |
Position of the legend. Default is |
... |
Additional graphical parameters passed to |
The median is numerically calculated by finding the root of
using uniroot.
A plot of the CDF and an invisible list containing the evaluation grid
data frame and the numerical value of the median.
Plot_CPTLENKBurr( m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 )Plot_CPTLENKBurr( m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 )
Generates an enhanced plot of the Probability Density Function (PDF) of the PTLENKBurr distribution over [0, +Inf), automatically calculating and displaying the numerical mode and median.
Plot_PPTLENKBurr( m, n, p, lambda, beta, c, k, max_x = NULL, show_mode = TRUE, show_median = TRUE, col_line = "deepskyblue4", col_mode = "darkorange2", col_median = "firebrick3", legend_pos = "topright", ... )Plot_PPTLENKBurr( m, n, p, lambda, beta, c, k, max_x = NULL, show_mode = TRUE, show_median = TRUE, col_line = "deepskyblue4", col_mode = "darkorange2", col_median = "firebrick3", legend_pos = "topright", ... )
m |
Parameter m of the distribution (m > 0). |
n |
Parameter n of the distribution (n > 0). |
p |
Parameter p of the distribution (p > 0). |
lambda |
Parameter lambda of the distribution (lambda > 0). |
beta |
Parameter beta of the distribution (beta > 0). |
c |
Parameter c of the Burr XII baseline component (c > 0). |
k |
Parameter k of the Burr XII baseline component (k > 0). |
max_x |
Optional maximum x-axis value. If NULL (default), it is automatically computed using the CDF. |
show_mode |
Logical. If TRUE (default), calculates and plots the mode. |
show_median |
Logical. If TRUE (default), calculates and plots the median. |
col_line |
Color of the PDF curve. Default is |
col_mode |
Color of the mode marker. Default is |
col_median |
Color of the median marker. Default is |
legend_pos |
Position of the legend. Default is |
... |
Additional graphical parameters passed to |
The upper bound max_x is determined automatically by finding where .
The mode is calculated numerically by maximizing the PDF via optimize,
and the median is found via uniroot on the CDF (C_PTLENKBurr).
A plot of the PDF and an invisible list containing the evaluation grid
data frame, calculated mode, and median.
Plot_PPTLENKBurr( m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 )Plot_PPTLENKBurr( m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 )
Calculates the quantile value (inverse CDF) of the PTLENKBurr distribution
for a given probability u or a vector of probabilities.
Q_PTLENKBurr(u, m, n, p, lambda, beta, c, k, tol = 1e-08)Q_PTLENKBurr(u, m, n, p, lambda, beta, c, k, tol = 1e-08)
u |
Numeric vector of probabilities ( |
m |
Parameter m of the distribution (m > 0). |
n |
Parameter n of the distribution (n > 0). |
p |
Parameter p of the distribution (p > 0). |
lambda |
Parameter lambda of the distribution (lambda > 0). |
beta |
Parameter beta of the distribution (beta > 0). |
c |
Parameter c of the Burr XII baseline component (c > 0). |
k |
Parameter k of the Burr XII baseline component (k > 0). |
tol |
Tolerance level for numerical root finding via |
The quantile function is obtained by numerically solving
using uniroot. The probability argument is named u to avoid
name collision with the distribution parameter p.
A numeric vector of quantiles corresponding to the probabilities in u.
# Calculate quartiles (25%, 50%, 75%) Q_PTLENKBurr( u = c(0.25, 0.5, 0.75), m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 )# Calculate quartiles (25%, 50%, 75%) Q_PTLENKBurr( u = c(0.25, 0.5, 0.75), m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 )
Generates random samples from the PTLENKBurr distribution using inverse transform sampling (quantile method).
R_PTLENKBurr(n_samples, m, n, p, lambda, beta, c, k)R_PTLENKBurr(n_samples, m, n, p, lambda, beta, c, k)
n_samples |
Number of random samples to generate (must be a positive integer). |
m |
Parameter m of the distribution (m > 0). |
n |
Parameter n of the distribution (n > 0). |
p |
Parameter p of the distribution (p > 0). |
lambda |
Parameter lambda of the distribution (lambda > 0). |
beta |
Parameter beta of the distribution (beta > 0). |
c |
Parameter c of the Burr XII baseline component (c > 0). |
k |
Parameter k of the Burr XII baseline component (k > 0). |
The parameter for the sample size is named n_samples to avoid naming
conflicts with the distribution parameter n. Random variates are generated
by applying the quantile function Q_PTLENKBurr to uniform random
variables: where .
A numeric vector of n_samples random values generated from
the PTLENKBurr distribution.
set.seed(123) sim_data <- R_PTLENKBurr( n_samples = 100, m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 ) head(sim_data)set.seed(123) sim_data <- R_PTLENKBurr( n_samples = 100, m = 1, n = 1, p = 1, lambda = 0.5, beta = 1.5, c = 2, k = 1 ) head(sim_data)
Generates a histogram of the provided dataset and overlays the fitted Probability
Density Function (PDF) of the PTLENKBurr distribution with parameters estimated
via Maximum Likelihood Estimation using E_PTLENKBurr.
Sim_PTLENKBurr( data, breaks = 15, col_hist = "lightblue", col_line = "firebrick3", ... )Sim_PTLENKBurr( data, breaks = 15, col_hist = "lightblue", col_line = "firebrick3", ... )
data |
Numeric vector of positive data values. |
breaks |
Number of breaks or break specification for the histogram. Default is |
col_hist |
Fill color for the histogram bars. Default is |
col_line |
Color for the fitted PDF curve. Default is |
... |
Additional graphical parameters passed to |
The function uses E_PTLENKBurr to estimate distribution parameters
and evaluates P_PTLENKBurr over a sequence from near zero to 1.2 times
the maximum data value.
An invisible named numeric vector containing the 7 estimated parameters
c(m, n, p, lambda, beta, c, k).
sample_data <- c(0.5, 1.2, 0.8, 2.1, 0.3, 1.5, 0.9) Sim_PTLENKBurr(sample_data)sample_data <- c(0.5, 1.2, 0.8, 2.1, 0.3, 1.5, 0.9) Sim_PTLENKBurr(sample_data)