Getting Started with autorelevate

library(autorelevate)

Introduction

The autorelevate package implements the autorelevated family of probability distributions, obtained by applying the autorelevation transform of Krakowski (1973) and Dileepkumar and Sankaran (2022) to a baseline lifetime distribution. Ten baseline distributions are supported: Weibull, Lomax, Burr XII, Gompertz, Log-Logistic, Chen, Exponentiated Exponential, Power Lindley, Log-normal, and Gamma. See ?autorelevate-package for the transform’s derivation and full methodological references, and citation("autorelevate") to cite the package itself.

A Real Dataset

The package bundles bladder_cancer, the remission times (in months) of 128 bladder cancer patients (Lee & Wang, 2003), the same dataset analyzed by Dileep Kumar, Shabeer, and Sankaran (2025, Sec. 8.1).

data(bladder_cancer)
summary(bladder_cancer)
#>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
#>   0.080   3.348   6.395   9.366  11.838  79.050

Step 1: Diagnose the hazard shape with a TTT plot

Before fitting anything, a Total Time on Test (TTT) plot (Aarset, 1987) shows whether the hazard rate is likely increasing, decreasing, bathtub, or upside-down bathtub (UBT), purely from the shape of the empirical curve relative to the 45-degree line.

ttt_plot(bladder_cancer)

The curve is concave then convex, indicating a UBT-shaped hazard – exactly the shape the Autorelevated Weibull was designed to capture (see ?haautorelevate for the theorem governing when the Autorelevated Weibull hazard is increasing, decreasing, or UBT).

Step 2: Compare all ten baseline distributions

family_table <- compare_families(bladder_cancer)
print(family_table)
#> 
#> Autorelevated Family Comparison Table (Ranked by AIC)
#> ----------------------------------------------------
#>        Family        p1        p2 LogLik   AIC   BIC  CAIC  HQIC KS_Stat
#>         lomax 9.264e-02 3.709e+00 -410.9 825.7 831.4 825.8 828.0 0.03315
#>  powerlindley 7.938e-01 6.252e-01 -411.1 826.3 832.0 826.4 828.6 0.05267
#>       weibull 4.317e-01 7.250e-01 -411.4 826.8 832.5 826.9 829.1 0.05298
#>         gamma 1.359e-01 5.439e-01 -413.9 831.8 837.5 831.9 834.1 0.07812
#>        expexp 1.575e-01 5.279e-01 -415.1 834.1 839.8 834.2 836.4 0.08785
#>     lognormal 6.287e-01 1.242e+00 -416.9 837.8 843.5 837.9 840.2 0.07087
#>          chen 3.418e-01 2.981e-01 -419.2 842.4 848.1 842.5 844.7 0.09309
#>   loglogistic 2.137e+00 1.487e+00 -420.4 844.8 850.5 844.9 847.1 0.06417
#>      gompertz 4.414e+04 4.838e-06 -426.8 857.6 863.3 857.7 859.9 0.14139
#>          burr 1.515e+00 7.020e-01 -431.9 867.8 873.5 867.9 870.1 0.16069
#>   KS_Pval
#>  0.998963
#>  0.869647
#>  0.865056
#>  0.415419
#>  0.276668
#>  0.541129
#>  0.217228
#>  0.667571
#>  0.011976
#>  0.002693

Families are ranked by AIC; BIC, CAIC, and HQIC are reported alongside for cross-checking, since they penalize model complexity differently (though here all ten distributions share the same two parameters, so the ranking is driven purely by fit).

Step 3: Fit and diagnose the best distribution

best_dist <- family_table$Family[1]
fit_best <- fit_autorelevate(bladder_cancer, dist = best_dist, method = "mle")
summary(fit_best)
#> 
#> Model Fit Summary (Distribution: lomax)
#> Estimation Method: MLE
#> 
#>    Estimate Std. Error
#> p1 0.092645     0.0326
#> p2 3.708918     0.9485
#> 
#> --- Goodness-of-Fit & Model Selection ---
#> Log-Likelihood: -410.861
#> AIC:             825.722
#> BIC:             831.426
#> CAIC:            825.818
#> HQIC:            828.039
#> KS Statistic:     0.0331 (p-value: 0.9990)
plot(fit_best)

Comparing Estimation Methods

Beyond comparing baseline distributions, you can compare MLE against Maximum Product of Spacings (MPS), Least Squares (LS), Weighted Least Squares (WLS), and Cramer-von Mises (CvM) for a single distribution:

fit_all_methods(bladder_cancer, dist = best_dist)
#>     Estimate_p1 Estimate_p2 KS_Statistic
#> MLE  0.09264470    3.708918   0.03314968
#> MPS  0.09264470    3.708918   0.03314968
#> LS   0.09224441    3.699603   0.02996296
#> WLS  0.09720036    3.555237   0.03065768
#> CVM  0.08642870    3.895910   0.02997489

MPS is a robust alternative to MLE when the likelihood is unbounded or the density has a singularity; LS and WLS (Swain, Venkatraman, & Wilson, 1988) are often preferred for small-to-moderate samples where MLE can be unstable.

Working With Distributions Directly

All ten baseline distributions expose the same six functions: dautorelevate(), pautorelevate(), sautorelevate(), haautorelevate(), qautorelevate(), and rautorelevate().

x <- seq(0.01, 5, by = 0.05)
plot(x, dautorelevate(x, dist = "weibull", p1 = 0.5, p2 = 1.5), type = "l",
     ylab = "Density", main = "Autorelevated Weibull density")

plot(x, haautorelevate(x, dist = "weibull", p1 = 0.5, p2 = 0.8), type = "l",
     ylab = "Hazard rate", main = "Upside-down bathtub hazard (beta = 0.8)")

References

Krakowski, M. (1973). The relevation transform and a generalization of the gamma distribution function. Revue francaise d’automatique, informatique, recherche operationnelle. Recherche operationnelle, 7(V2), 107-120.

Dileepkumar, M., & Sankaran, P. G. (2022). Some results of auto-relevation transform in reliability analysis. Statistics and Applications, 20(2), 251-263.

Dileep Kumar, M., Shabeer, A. M., & Sankaran, P. G. (2025). Reliability properties and applications of autorelevated Weibull distribution. American Journal of Mathematical and Management Sciences, 44(3-4), 215-237.

Sharma, V. K., Pal, S., Bhardwaj, H., & Tyagi, V. (2026). The autorelevated Lomax distribution: An upside-down bathtub hazard model with properties and applications to cancer survival data. Submitted.

Aarset, M. V. (1987). How to identify a bathtub hazard rate. IEEE Transactions on Reliability, R-36(1), 106-108.

Lee, E. T., & Wang, J. W. (2003). Statistical Methods for Survival Data Analysis (3rd ed.). Wiley.