Bayesian Point Estimation Using Lindley's Approximation Under Censoring Schemes

Performs Bayesian point estimation using Lindley's Approximation (1980) for arbitrary univariate probability distributions under numerous censoring and truncation schemes. Users supply the probability density function (PDF), cumulative distribution function (CDF), survival function, log-prior density, initial parameter vector, support bounds, and observed data; the package automatically computes Bayesian point estimates under various loss functions using Lindley's approximation. Supported schemes include complete data, right censoring, left censoring, interval censoring, random censoring, block random censoring, Type-I censoring, Type-II censoring, progressive Type-II censoring, progressive first failure censoring, joint Type-I censoring, joint Type-II censoring, balanced joint progressive Type-II censoring, hybrid censoring, hybrid Type-I censoring, hybrid Type-II censoring, Type-I hybrid censoring, Type-II progressively hybrid censoring, doubly Type-II censoring, middle censoring, right truncation, and left truncation. The package computes posterior expectations of arbitrary smooth functions, supports multiple loss functions (squared error loss function (SELF), weighted squared error loss function (WSELF), modified quadratic squared error loss function (MQSELF), precautionary loss function (PLF), entropy loss function (ELF), linear-exponential (LINEX), generalized entropy loss function (GELF), Kullback-Leibler loss function (K-Loss), and user-defined), provides model selection criteria (Akaike information criterion (AIC), Bayesian information criterion (BIC), corrected Akaike information criterion (AICc), Hannan-Quinn information criterion (HQIC), consistent Akaike information criterion (CAIC), Kullback information criterion (KIC)), goodness-of-fit statistics (Kolmogorov-Smirnov, Anderson-Darling, Cramer-von Mises, Watson, Chi-square), residual analysis (Cox-Snell, Martingale, Deviance, Pearson, Generalized, Randomized quantile), comprehensive visualization tools, prediction utilities, and simulation functions for benchmarking estimators. Methods are described in Lindley (1980) , Tierney and Kadane (1986) , Tierney, Kass, and Kadane (1989) , Nagar, Kumar, and Krishna (2026) , Goel, Kumar, and Krishna (2026, "Estimation in power Lindley distributions using balanced joint progressively Type-II censored data"), Wu and Kus (2009) , Goel and Krishna (2026) , Balakrishnan and Aggarwala (2000, ISBN:978-1-4612-1334-5), Mondal and Kundu (2020) , Ding and Gui (2023) , Prajapati, Mitra, and Kundu (2019) , Yadav, Jaiswal, and Yadav (2026) , Iyer, Jammalamadaka, and Kundu (2008) , Banerjee and Kundu (2008) , and Kundu and Joarder (2006) .


UniLindleyApprox

Bayesian Point Estimation Using Lindley's Approximation Under Censoring Schemes

UniLindleyApprox is a CRAN-quality R package for performing Bayesian parameter estimation using Lindley's Approximation (1980) for arbitrary univariate probability distributions under complete, censored, and truncated data.

Features

  • Generalized Framework: Works with any user-defined univariate probability distribution
  • Multiple Censoring Schemes: Supports 23 different censoring and truncation schemes
  • Loss Functions: Computes Bayes estimates under 8 different loss functions
  • Automatic Derivatives: Numerical computation of first, second, and third-order derivatives
  • Comprehensive Diagnostics: Goodness-of-fit statistics, residual analysis, model selection criteria
  • Visualization: Diagnostic plots including posterior surfaces, likelihood profiles, QQ plots
  • Simulation Utilities: Functions for benchmarking estimators under various censoring schemes

Installation

# Install from CRAN (when available)
install.packages("UniLindleyApprox")

# Install development version
devtools::install_github("username/UniLindleyApprox")

Quick Start

library(UniLindleyApprox)

# Define probability functions for exponential distribution
dexp_custom <- function(x, theta) dexp(x, rate = theta[1])
pexp_custom <- function(x, theta) pexp(x, rate = theta[1])
sexp_custom <- function(x, theta) 1 - pexp(x, rate = theta[1])

# Define log-prior (Gamma prior for rate)
logprior <- function(theta) {
  dgamma(theta[1], shape = 2, rate = 1, log = TRUE)
}

# Generate data
set.seed(123)
x <- rexp(50, rate = 2)

# Fit model using Lindley's approximation
fit <- lindley_fit(
  data = x,
  pdf = dexp_custom,
  cdf = pexp_custom,
  survival = sexp_custom,
  log_prior = logprior,
  theta0 = c(1),
  scheme = "complete",
  loss = "SELF"
)

# View results
print(fit)
summary(fit)

# Diagnostic plots
plot(fit)

# Goodness-of-fit statistics
gof_stats(fit)

Supported Censoring Schemes

  1. Complete data
  2. Right censoring
  3. Left censoring
  4. Interval censoring
  5. Random censoring
  6. Block random censoring
  7. Type-I censoring
  8. Type-II censoring
  9. Progressive Type-II censoring
  10. Progressive first failure censoring
  11. Joint Type-I censoring
  12. Joint Type-II censoring
  13. Balanced joint progressive Type-II censoring
  14. Hybrid censoring
  15. Hybrid Type-I censoring
  16. Hybrid Type-II censoring
  17. Type-I hybrid censoring
  18. Type-II progressively hybrid censoring
  19. Doubly Type-II censoring
  20. Middle censoring
  21. Right truncation
  22. Left truncation

Supported Loss Functions

  • SELF: Squared Error Loss Function
  • WSELF: Weighted Squared Error Loss Function
  • MQSELF: Modified Quadratic Squared Error Loss Function
  • PLF: Precautionary Loss Function
  • ELF: Entropy Loss Function
  • LINEX: Linear Exponential Loss Function
  • GELF: General Entropy Loss Function
  • K-Loss: K-Loss Function

Model Selection Criteria

  • AIC (Akaike Information Criterion)
  • AICc (Corrected AIC)
  • BIC (Bayesian Information Criterion)
  • HQIC (Hannan-Quinn Information Criterion)
  • CAIC (Consistent AIC)
  • KIC (Kullback Information Criterion)

Goodness-of-Fit Statistics

  • Kolmogorov-Smirnov statistic
  • Anderson-Darling statistic
  • Cramér-von Mises statistic
  • Watson statistic
  • Chi-square statistic
  • Mean Squared Error
  • Mean Absolute Error
  • Root Mean Squared Error

Residual Types

  • Cox-Snell residuals
  • Martingale residuals
  • Deviance residuals
  • Pearson residuals
  • Generalized residuals
  • Randomized quantile residuals

Citation

If you use UniLindleyApprox in your research, please cite:

Tyagi, S., Pandey, A., Singh, B., & Tripathi, V. (2024). UniLindleyApprox: 
Bayesian Point Estimation Using Lindley's Approximation Under Censoring Schemes. 
R package version 0.1.0.

References

  • Lindley, D. V. (1980). Approximate Bayesian methods. Trabajos de Estadistica y de Investigacion Operativa, 31(1), 223-245.
  • Tierney, L., & Kadane, J. B. (1986). Accurate approximations for posterior moments and marginal densities. Journal of the American Statistical Association, 81(393), 82-86.
  • Tierney, L., Kass, R. E., & Kadane, J. B. (1989). Fully exponential Laplace approximations to expectations and variances of nonpositive functions. Journal of the American Statistical Association, 84(407), 710-716.

License

GPL-3

Authors

  • Shikhar Tyagi [aut, cre]
  • Arvind Pandey [aut]
  • Bhupendra Singh [aut]
  • Vrijesh Tripathi [aut]

Related Packages

  • UniCensor: Generalized generation of censored and truncated random samples
  • UniCensorEM: Generalized maximum likelihood estimation using the EM algorithm
  • UniIS: Generalized Bayesian and likelihood inference using importance sampling

These packages complement each other while sharing a consistent interface and design philosophy.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("UniLindleyApprox")

0.1.0 by Shikhar Tyagi, 2 months ago


Browse source code at https://github.com/cran/UniLindleyApprox


Authors: Shikhar Tyagi [aut, cre] (ORCID: , Arvind Pandey [aut] , Bhupendra Singh [aut] , Vrijesh Tripathi [aut]


Documentation:   PDF Manual  


GPL-3 license


Imports stats, graphics, grDevices, utils, methods, numDeriv, MASS

Suggests testthat, ggplot2, future, parallel, knitr, rmarkdown


See at CRAN