Skip to content

TKApprox

0.1.0Package record

A General Framework for Bayesian Estimation Using the 'Tierney'-'Kadane' Approximation

0packages depend
566downloads / year
48.8%test coverage
13/13flavors OK

Overview

About

Provides a distribution-independent framework for Bayesian estimation of arbitrary univariate probability models using the 'Tierney'-'Kadane' approximation ('Tierney' & 'Kadane', 1986 doi:10.1080/01621459.1986.10478240). Users specify the probability distribution, likelihood, prior distributions, and censoring mechanism, while the package automatically constructs the posterior distribution, computes posterior modes and Hessian matrices, approximates posterior expectations under several Bayesian loss functions, and returns Bayesian parameter estimates, posterior covariance matrices, credible intervals, diagnostic plots, and model comparison statistics. Supports complete, right-, left-, interval-, Type-I, Type-II, progressive Type-II, hybrid, and doubly censored data ('Lawless', 2003 <ISBN:978-0-471-37215-8>; 'Meeker' & 'Escobar', 1998 <ISBN:978-0-471-14328-4>; 'Balakrishnan' & 'Aggarwala', 2000 <ISBN:978-0-8176-4129-0>; 'Kundu' & 'Pradhan', 2009 doi:10.1198/TECH.2009.0019), making it a flexible tool for Bayesian reliability, survival, and lifetime data analysis.

Changes in 0.1.0

Initial Release

Features

  • Distribution-agnostic Bayesian estimation framework using Tierney-Kadane approximation
  • Support for arbitrary univariate probability distributions (continuous or discrete)
  • Multiple Bayesian loss functions:
  • Squared Error Loss (SEL) - posterior mean
  • LINEX Loss - asymmetric linear-exponential loss
  • General Entropy Loss (GEL) - generalized entropy loss
  • Precautionary Loss - conservative estimation
  • Weighted Squared Error Loss - inverse-variance weighting
  • Custom loss functions - user-defined

Censoring Support

Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
  • Complete (uncensored) data
  • Right-censored data
  • Left-censored data
  • Interval-censored data
  • Type-I censoring
  • Type-II censoring
  • Progressive Type-II censoring
  • Hybrid censoring
  • Doubly censored data

Prior Distributions

  • Gamma prior
  • Normal prior
  • Beta prior
  • Uniform prior
  • Exponential prior
  • Log-Normal prior
  • Weibull prior
  • Inverse Gamma prior
  • User-defined priors (via custom functions)
  • Independent priors for multiple parameters

Optimization

  • Multiple backends: BFGS, L-BFGS-B, Nelder-Mead, nlminb, maxLik, trust
  • Automatic fallback between optimization methods
  • Convergence diagnostics and iteration tracking
  • Support for parameter bounds

Numerical Differentiation

  • Numerical gradients and Hessians via numDeriv
  • Optional analytic derivative support with validation

Model Comparison

  • AIC (Akaike Information Criterion)
  • BIC (Bayesian Information Criterion)
  • CAIC (Consistent AIC)
  • HQIC (Hannan-Quinn Information Criterion)
  • DIC (Deviance Information Criterion) approximation
  • Expected log-posterior
  • Negative log-likelihood

Visualization

  • Posterior approximation plots (per parameter)
  • Likelihood surface and profile likelihood plots
  • Contour plots for two-parameter models
  • Prior vs posterior comparison plots
  • Convergence diagnostics
  • Credible interval forest plots
  • Residuals plots (Pearson and deviance)

Prior Sensitivity Analysis

  • Systematic variation of prior hyperparameters
  • Impact on estimates, bias, variance, and risk
  • Sensitivity plots and tables

S3 Methods

  • summary() - comprehensive model summary
  • print() - concise output
  • coef() - extract Bayes estimates
  • vcov() - extract posterior covariance matrix
  • logLik() - extract log-likelihood
  • AIC() - compute AIC
  • BIC() - compute BIC
  • plot() - diagnostic plots
  • predict() - generate predictions
  • residuals() - compute residuals

Testing

  • Comprehensive testthat test suite
  • Tests for all censoring schemes
  • Tests for multiple prior families
  • Tests for loss functions
  • Tests for optimization scenarios
  • GitHub Actions CI/CD for cross-platform checking

Documentation

  • roxygen2 documentation for all exported functions
  • Runnable examples in documentation
  • Comprehensive vignettes (planned)

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.0 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OKNow
  • OK6 OK2026-08-08
Advisories

none known

Documentation

In release 0.1.0
READMEYes · 490 wordsVignettesYes · 8 · dynamicNEWSYes · 67% structured · mentions 0.1.0Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
62
Examples that run
100%25 run in a plain check
Exported functions with examples
56%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

566
CRAN downloads in the past year
Rank #22,981 · ~2/day · ~47/mo
Daily download trend is not available in this view yet.
22230 days
56690 days
5661 year
Compare downloads with other packages →
Also on14 r2u1 autocran

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)

Installing TKApprox adds 10 packages (5 with compiled code, 4.2 MB of source tarballs). Heaviest: sandwich 1.4 MB, maxLik 791 KB, rlang 766 KB.

Depends (1)
R >= 4.0.0
Imports (9)
checkmatenumDerivmaxLikrlangstatsgraphicsgrDevicesutilsMASS
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (4)
Author, Maintainer since 0.1.0 (2026)
Releases (1)
  • 0.1.0Latest
    2026-08-07 · current release
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-08-07
Total releases
1 / 1 yrs
License
GPL (>= 3) OSI
Minimum R
≥ 4.0.0
Download size
232 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("TKApprox")
Tyagi, S., Pandey, A., Singh, B., & Tripathi, V. (2026). TKApprox: A General Framework for Bayesian Estimation Using the 'Tierney'-'Kadane' Approximation (Version 0.1.0) [Computer software]. https://doi.org/10.32614/CRAN.package.TKApprox

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for TKApprox version 0.1.0 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy