Package {ModToppLeone}


Type: Package
Title: Modified Topp-Leone Distribution: Properties, Estimation, and Applications
Version: 0.1.0
Description: Provides density, cumulative distribution function, quantile function, random number generation, survival function, hazard rate function, statistical properties, classical point and interval estimation (maximum likelihood, ordinary least squares, weighted least squares, Cramer-von Mises, and maximum product of spacings), Bayesian estimation under symmetric and asymmetric loss functions (squared error, entropy, precautionary, and generalized entropy loss functions) with highest posterior density intervals, censoring schemes (random, Type-I, Type-II, and progressive Type-II censoring), and real data applications for the 'Modified Topp-Leone' distribution. Methods are based on Singh et al. (2025) https://statassoc.or.th, Cheng and Amin (1983) <doi:10.1111/j.2517-6161.1983.tb01267.x>, Swain et al. (1988) <doi:10.1080/00949658808811094>, Chen and Shao (1999) <doi:10.1080/10618600.1999.10474802>, and Balakrishnan and Aggarwala (2000) <doi:10.1007/978-1-4612-1178-5>.
License: GPL (≥ 3)
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.3
Depends: R (≥ 3.5.0)
Imports: stats, graphics
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2026-08-05 02:51:05 UTC; shikhar tyagi
Author: Shikhar Tyagi ORCID iD [aut, cre], Abhishek Tyagi [aut], Arvind Pandey [aut], Bhupendra Singh [aut], Vrijesh Tripathi [aut]
Maintainer: Shikhar Tyagi <shikhar1093tyagi@gmail.com>
Repository: CRAN
Date/Publication: 2026-08-09 08:40:18 UTC

The Modified Topp-Leone Distribution

Description

Density, distribution function, quantile function, random generation, survival function, and hazard rate function for the Modified Topp-Leone (MTL) distribution with shape parameter alpha.

Usage

dmtl(x, alpha, log = FALSE)

pmtl(q, alpha, lower.tail = TRUE, log.p = FALSE)

qmtl(p, alpha, lower.tail = TRUE, log.p = FALSE)

rmtl(n, alpha)

smtl(x, alpha, log.p = FALSE)

hmtl(x, alpha, log = FALSE)

Arguments

x, q

Vector of quantiles.

alpha

Shape parameter of the MTL distribution (alpha > 0).

log, log.p

Logical; if TRUE, probabilities/densities p are given as \log(p). Default is FALSE.

lower.tail

Logical; if TRUE (default), probabilities are P[X \le x], otherwise P[X > x].

p

Vector of probabilities.

n

Number of observations. If length(n) > 1, the length is taken to be the number required.

Details

The probability density function (PDF) of the Modified Topp-Leone distribution is given by:

f(x; \alpha) = 2 \alpha (1 + x)^{-(2\alpha + 1)} (2x + x^2)^{\alpha - 1}, \quad x > 0, \; \alpha > 0

The cumulative distribution function (CDF) is given by:

F(x; \alpha) = \left( \frac{2x + x^2}{(1 + x)^2} \right)^\alpha = \left( 1 - \frac{1}{(1 + x)^2} \right)^\alpha, \quad x > 0, \; \alpha > 0

The quantile function is derived by inverting the CDF:

Q(p; \alpha) = (1 - p^{1/\alpha})^{-1/2} - 1, \quad 0 < p < 1

Value

dmtl gives the density, pmtl gives the distribution function, qmtl gives the quantile function, rmtl generates random deviates, smtl gives the survival function, and hmtl gives the hazard rate function.

Author(s)

Shikhar Tyagi, Abhishek Tyagi, Arvind Pandey, Bhupendra Singh, Vrijesh Tripathi

References

Singh, B., Tyagi, S., Singh, R. P., and Tyagi, A. (2025). Modified Topp-Leone Distribution: Properties, Classical and Bayesian Estimation with Application to COVID-19 and Reliability Data. Thailand Statistician, 23(1), 72-96.

Examples

# Evaluate PDF and CDF at x = 1 with alpha = 1.5
dmtl(x = 1, alpha = 1.5)
pmtl(q = 1, alpha = 1.5)

# Quantile function and random generation
p_seq <- c(0.25, 0.50, 0.75)
qmtl(p = p_seq, alpha = 1.5)
set.seed(123)
x_sample <- rmtl(n = 10, alpha = 1.5)
x_sample

# Survival and Hazard functions
smtl(x = 1, alpha = 1.5)
hmtl(x = 1, alpha = 1.5)


Bayesian Estimation for the Modified Topp-Leone Distribution

Description

Estimates the shape parameter alpha of the Modified Topp-Leone (MTL) distribution under informative (Gamma) and non-informative priors using symmetric (SELF) and asymmetric (ELF, PLF, GELF) loss functions, along with Chen-Shao Highest Posterior Density (HPD) intervals.

Usage

bayes_mtl(
  x,
  prior = c("informative", "noninformative"),
  a = 1,
  b = 1,
  loss = c("self", "elf", "plf", "gelf", "all"),
  delta = 1,
  n.draws = 10000,
  burn.in = 1000,
  thin = 1,
  conf.level = 0.95
)

Arguments

x

Vector of sample observations (x > 0).

prior

Type of prior distribution: "informative" (Gamma(a, b)) or "noninformative" (a = 0, b = 0).

a

Shape parameter for Gamma prior (hyperparameter a > 0).

b

Rate parameter for Gamma prior (hyperparameter b > 0).

loss

Loss function: "self" (Squared Error Loss), "elf" (Entropy Loss), "plf" (Precautionary Loss), "gelf" (Generalized Entropy Loss), or "all".

delta

Constant for Generalized Entropy Loss Function (delta != 0). Default is 1.

n.draws

Number of MCMC iterations (default: 10000).

burn.in

Number of initial draws to discard as burn-in (default: 1000).

thin

Thinning interval for MCMC chain (default: 1).

conf.level

Credible level for HPD interval estimation (default: 0.95).

Value

A list containing point estimates under specified loss functions, posterior standard error (PSE), posterior summary statistics, MCMC sample draws, and the 100*(1 - alpha)% HPD interval.

Author(s)

Shikhar Tyagi, Abhishek Tyagi, Arvind Pandey, Bhupendra Singh, Vrijesh Tripathi

References

Singh, B., Tyagi, S., Singh, R. P., and Tyagi, A. (2025). Modified Topp-Leone Distribution: Properties, Classical and Bayesian Estimation with Application to COVID-19 and Reliability Data. Thailand Statistician, 23(1), 72-96.

Chen, M. H., and Shao, Q. M. (1999). Monte Carlo estimation of Bayesian credible and HPD intervals. Journal of Computational and Graphical Statistics, 8(1), 69-92.

Calabria, R., and Pulcini, G. (1996). Point estimation under asymmetric loss functions for left-truncated exponential samples. Communications in Statistics - Theory and Methods, 25(3), 585-600.

Examples

set.seed(123)
sample_data <- rmtl(n = 30, alpha = 2.5)

# Bayesian Estimation under Non-informative Prior
bayes_mtl(x = sample_data, prior = "noninformative", loss = "all")

# Bayesian Estimation under Informative Prior (a = 2, b = 1)
bayes_mtl(x = sample_data, prior = "informative", a = 2, b = 1, loss = "self")


Censoring Schemes and Estimation for the Modified Topp-Leone Distribution

Description

Functions to generate random samples and estimate parameters of the Modified Topp-Leone (MTL) distribution under various censoring schemes: Random Right Censoring, Type-I Censoring, Type-II Censoring, and Progressive Type-II Censoring.

Usage

rcensor_mtl(
  n,
  alpha,
  scheme = c("random", "type1", "type2", "progressive2"),
  T_censor = NULL,
  m = NULL,
  R = NULL,
  censor_rate = 0.5
)

mle_censor_mtl(
  x,
  status = NULL,
  scheme = c("random", "type1", "type2", "progressive2"),
  R = NULL,
  conf.level = 0.95
)

Arguments

n

Total initial sample size.

alpha

Shape parameter of the MTL distribution (alpha > 0).

scheme

Type of censoring scheme: "random", "type1", "type2", or "progressive2".

T_censor

Fixed censoring time for Type-I censoring (T_censor > 0).

m

Number of observed failures for Type-II or Progressive Type-II censoring (1 <= m <= n).

R

Vector of removal counts for Progressive Type-II censoring of length m such that sum(R) == n - m.

censor_rate

Rate parameter for exponential censoring distribution in random censoring.

x

Vector of observed failure/censoring times.

status

Vector of censoring indicators (1 = observed failure, 0 = censored).

conf.level

Confidence level for interval estimation (default: 0.95).

Value

rcensor_mtl returns a list containing observed times (x), censoring status (status), censoring scheme info, and parameter settings. mle_censor_mtl returns a list containing point estimate (estimate), standard error (se), asymptotic confidence interval (ci), and log-likelihood value under censoring.

Author(s)

Shikhar Tyagi, Abhishek Tyagi, Arvind Pandey, Bhupendra Singh, Vrijesh Tripathi

References

Singh, B., Tyagi, S., Singh, R. P., and Tyagi, A. (2025). Modified Topp-Leone Distribution: Properties, Classical and Bayesian Estimation with Application to COVID-19 and Reliability Data. Thailand Statistician, 23(1), 72-96.

Balakrishnan, N., and Aggarwala, R. (2000). Progressive Censoring: Theory, Methods, and Applications. Birkhäuser, Boston.

Examples

set.seed(123)
# 1. Random Right Censoring
rand_cens <- rcensor_mtl(n = 30, alpha = 2.0, scheme = "random", censor_rate = 0.5)
mle_censor_mtl(x = rand_cens$x, status = rand_cens$status, scheme = "random")

# 2. Type-I Censoring
t1_cens <- rcensor_mtl(n = 30, alpha = 2.0, scheme = "type1", T_censor = 1.5)
mle_censor_mtl(x = t1_cens$x, status = t1_cens$status, scheme = "type1")

# 3. Type-II Censoring
t2_cens <- rcensor_mtl(n = 30, alpha = 2.0, scheme = "type2", m = 20)
mle_censor_mtl(x = t2_cens$x, status = t2_cens$status, scheme = "type2")

# 4. Progressive Type-II Censoring
R_scheme <- c(2, 0, 1, 0, 2, 0, 1, 0, 2, 2)
prog_cens <- rcensor_mtl(n = 20, alpha = 2.0, scheme = "progressive2", m = 10, R = R_scheme)
mle_censor_mtl(x = prog_cens$x, scheme = "progressive2", R = R_scheme)


Classical Estimation Methods for the Modified Topp-Leone Distribution

Description

Point and interval estimation of the shape parameter alpha of the Modified Topp-Leone (MTL) distribution using classical methods: Maximum Likelihood (MLE), Ordinary Least Squares (OLS), Weighted Least Squares (WLS), Cramér-von Mises (CVM), and Maximum Product of Spacings (MPS).

Usage

mle_mtl(x, conf.level = 0.95)

ols_mtl(x)

wls_mtl(x)

cvm_mtl(x)

mps_mtl(x)

fit_mtl(
  x,
  method = c("mle", "ols", "wls", "cvm", "mps", "all"),
  conf.level = 0.95
)

Arguments

x

Vector of sample observations (x > 0).

conf.level

Confidence level for interval estimation (default: 0.95).

method

Estimation method: "mle", "ols", "wls", "cvm", "mps", or "all".

Value

A list or data frame containing point estimate, standard error, asymptotic confidence interval, log-likelihood, AIC, BIC, CAIC, Kolmogorov-Smirnov test statistic, and associated p-value.

Author(s)

Shikhar Tyagi, Abhishek Tyagi, Arvind Pandey, Bhupendra Singh, Vrijesh Tripathi

References

Singh, B., Tyagi, S., Singh, R. P., and Tyagi, A. (2025). Modified Topp-Leone Distribution: Properties, Classical and Bayesian Estimation with Application to COVID-19 and Reliability Data. Thailand Statistician, 23(1), 72-96.

Cheng, R. C. H., and Amin, N. A. K. (1983). Estimating parameters in continuous univariate distributions with a shifted origin. Journal of the Royal Statistical Society: Series B, 45(3), 394-403.

Swain, J. J., Venkatraman, S., and Wilson, J. R. (1988). Least-squares estimation of distribution functions in Johnson's translation system. Journal of Statistical Computation and Simulation, 29(4), 271-297.

Examples

set.seed(123)
sample_data <- rmtl(n = 50, alpha = 2.0)

# MLE Estimation
mle_mtl(x = sample_data)

# OLS and WLS Estimation
ols_mtl(x = sample_data)
wls_mtl(x = sample_data)

# CVM and MPS Estimation
cvm_mtl(x = sample_data)
mps_mtl(x = sample_data)

# Fit all classical methods simultaneously
fit_mtl(x = sample_data, method = "all")


Diagnostic and Visualization Plots for the Modified Topp-Leone Distribution

Description

Plot probability density function (PDF), cumulative distribution function (CDF), survival function (SF), or hazard rate function (HRF) of the Modified Topp-Leone (MTL) distribution for specified values of alpha.

Usage

plot_mtl(
  alpha = c(0.5, 1.5, 3, 10),
  type = c("pdf", "cdf", "sf", "hrf"),
  x_max = 10,
  n_points = 500
)

Arguments

alpha

Vector of shape parameter values (alpha > 0).

type

Type of plot: "pdf", "cdf", "sf", or "hrf".

x_max

Maximum value of x on the horizontal axis (default: 10).

n_points

Number of evaluation points along the x-axis (default: 500).

Value

No return value, called for side effects (produces a plot).

Author(s)

Shikhar Tyagi, Abhishek Tyagi, Arvind Pandey, Bhupendra Singh, Vrijesh Tripathi

References

Singh, B., Tyagi, S., Singh, R. P., and Tyagi, A. (2025). Modified Topp-Leone Distribution: Properties, Classical and Bayesian Estimation with Application to COVID-19 and Reliability Data. Thailand Statistician, 23(1), 72-96.

Examples

# Plot PDF for various values of alpha
plot_mtl(alpha = c(0.5, 1.5, 3.0, 10.0), type = "pdf", x_max = 5)

# Plot HRF for various values of alpha
plot_mtl(alpha = c(0.5, 1.5, 3.0, 10.0), type = "hrf", x_max = 5)


Statistical Properties of the Modified Topp-Leone Distribution

Description

Functions to calculate various statistical properties of the Modified Topp-Leone (MTL) distribution including mode, mean, quantiles, mean deviations, inequality measures, mean residual life, mean past life, probability-weighted moments, entropies, stress-strength reliability, and order statistics.

Usage

mode_mtl(alpha)

mean_mtl(alpha, n_terms = 100)

moments_mtl(r, alpha, n_terms = 100)

quantiles_mtl(alpha)

meandev_mtl(alpha)

inequality_mtl(y, alpha)

mrl_mtl(y, alpha)

mpl_mtl(y, alpha)

pwm_mtl(r, s, alpha)

entropy_mtl(alpha, type = c("shannon", "renyi", "omega"), gamma = 0.5)

ssr_mtl(alpha1, alpha2)

order_stats_mtl(y, alpha, n, u, type = c("pdf", "cdf"))

Arguments

alpha

Shape parameter of the MTL distribution (alpha > 0).

n_terms

Number of terms to use in series expansions (default: 100).

r

Order of the raw moment or probability-weighted moment.

y

Evaluation point for residual life, past life, inequality curves, or order statistics.

s

Parameter for probability-weighted moment.

type

Type of entropy ("renyi", "shannon", or "omega") or order statistics output ("pdf" or "cdf").

gamma

Order parameter for Rényi or \omega-entropy (gamma > 0, gamma != 1).

alpha1, alpha2

Shape parameters for two independent MTL variables in stress-strength reliability.

n

Sample size for order statistics.

u

Index of the order statistic (1 <= u <= n).

Value

Numeric scalar or vector corresponding to the calculated statistical property:

Author(s)

Shikhar Tyagi, Abhishek Tyagi, Arvind Pandey, Bhupendra Singh, Vrijesh Tripathi

References

Singh, B., Tyagi, S., Singh, R. P., and Tyagi, A. (2025). Modified Topp-Leone Distribution: Properties, Classical and Bayesian Estimation with Application to COVID-19 and Reliability Data. Thailand Statistician, 23(1), 72-96.

Examples

# Mode and Mean
mode_mtl(alpha = 2.5)
mean_mtl(alpha = 1.5)

# Quantiles summary
quantiles_mtl(alpha = 1.5)

# Mean deviations
meandev_mtl(alpha = 1.5)

# Inequality measures at y = 1
inequality_mtl(y = 1, alpha = 1.5)

# Mean residual life and past life
mrl_mtl(y = 1, alpha = 1.5)
mpl_mtl(y = 1, alpha = 1.5)

# Entropies
entropy_mtl(alpha = 1.5, type = "shannon")
entropy_mtl(alpha = 1.5, type = "renyi", gamma = 0.5)

# Stress-Strength Reliability
ssr_mtl(alpha1 = 2, alpha2 = 3)

# Order statistics density for median in n = 5 sample
order_stats_mtl(y = 1, alpha = 1.5, n = 5, u = 3, type = "pdf")


Real Datasets used in Modified Topp-Leone Research Paper

Description

Three real-world datasets examined in Singh et al. (2025) to illustrate the flexibility and applicability of the Modified Topp-Leone distribution.

Usage

dataset_air

dataset_covid_india

dataset_covid_france

Format

Numeric vectors containing positive observations:

dataset_air

Number of successive failures for the air conditioning system of each member in a fleet of 13 Boeing 720 jet airplanes (divided by 100 for fitting convenience).

dataset_covid_india

Daily new COVID-19 cases in India from 16 March 2021 to 16 April 2021 (divided by 10,000).

dataset_covid_france

Daily new COVID-19 cases in France from 5 August 2020 to 5 November 2020 (divided by 10,000).

An object of class numeric of length 39.

An object of class numeric of length 50.

References

Singh, B., Tyagi, S., Singh, R. P., and Tyagi, A. (2025). Modified Topp-Leone Distribution: Properties, Classical and Bayesian Estimation with Application to COVID-19 and Reliability Data. Thailand Statistician, 23(1), 72-96.

Cordeiro, G. M., and Lemonte, A. J. (2011). The beta-Birnbaum-Saunders distribution: An improved distribution for fatigue life modelling. Computational Statistics & Data Analysis, 55(3), 1445-1461.

Examples

data(dataset_air)
mle_mtl(dataset_air)

data(dataset_covid_india)
fit_mtl(dataset_covid_india, method = "all")

data(dataset_covid_france)
bayes_mtl(dataset_covid_france, prior = "noninformative")