| Title: | Bivariate Laplace Transforms, Stochastic Orders, and Entropy Measures in Reliability |
|---|---|
| Description: | Implements methods for bivariate and univariate Laplace transforms of residual lives and reversed residual lives, associated stochastic ordering concepts, and entropy measures for reliability analysis. The package covers: (1) Bivariate Laplace transform of residual lives and stochastic comparisons based on the bivariate Laplace transform order of residual lives (BLt-rl), including weak bivariate hazard rate, mean residual life, and relative mean residual life orders, nonparametric estimation, and NBUHR/NWUHR aging class characterisation; Jayalekshmi, Rajesh, and Nair (2022) "Bivariate Laplace Transform of Residual Lives and Their Properties" <doi:10.1080/03610926.2022.2085874>; (2) Bivariate Laplace transform order of reversed residual lives (BLt-Rrl), reversed hazard gradient, reversed mean residual life, and the associated stochastic orders (weak bivariate reversed hazard rate, weak bivariate reversed mean residual life); Jayalekshmi, Rajesh, and Nair (2022) "Bivariate Laplace Transform Order and Ordering of Reversed Residual Lives" <doi:10.1142/S0218539322500061>; (3) Univariate Laplace transform of residual life, hazard rate, mean residual life, and the corresponding stochastic orders (Lt-rl order, hazard rate order, MRL order), together with a nonparametric estimator. Shannon entropy and Golomb's (1966) information generating function are also provided. Parametric families supported include the Gumbel bivariate exponential, Farlie-Gumbel-Morgenstern (FGM), bivariate power, and Schur-constant distributions. Plotting utilities and a simulation framework for evaluating estimator performance are also provided. |
| Authors: | Mahesh Divakaran [aut, cre] (ORCID: <https://orcid.org/0000-0002-3488-0857>, affiliation: Amity School of Applied Sciences, Amity University Lucknow), S. Jayalekshmi [aut, ctb] (affiliation: Department of Statistics, Cochin University of Science and Technology), G. Rajesh [aut] (affiliation: Department of Statistics, Cochin University of Science and Technology), N. Unnikrishnan Nair [aut] (affiliation: Department of Statistics, Cochin University of Science and Technology) |
| Maintainer: | Mahesh Divakaran <[email protected]> |
| License: | GPL-3 |
| Version: | 1.0.0 |
| Built: | 2026-05-21 10:40:04 UTC |
| Source: | https://github.com/itsmdivakaran/bivlaplacerl |
BivLaplaceRL provides a unified framework for reliability analysis covering bivariate and univariate Laplace transforms of residual lives, associated stochastic orders, and entropy measures:
1. Bivariate Laplace Transform of Residual Lives
Implements the vector Laplace transform of bivariate residual lives
, the associated
stochastic ordering BLt-rl, and its relationships with the weak bivariate
hazard rate order, weak bivariate mean residual life order, and bivariate
relative mean residual life order. Nonparametric estimation and NBUHR/NWUHR
aging class tests are included.
Reference: Jayalekshmi, Rajesh, and Nair (2022)
doi:10.1080/03610926.2022.2085874.
2. Bivariate Laplace Transform of Reversed Residual Lives
Implements the bivariate Laplace transform of reversed (past) residual lives, the BLt-Rrl stochastic order, and connections with weak bivariate reversed hazard rate and reversed mean residual life orders. Reference: Jayalekshmi, Rajesh, and Nair (2022) doi:10.1142/S0218539322500061.
3. Univariate Residual Life Analysis
Implements the univariate Laplace transform of residual life
, hazard rate, mean residual life,
and the corresponding stochastic orders (Lt-rl order, hazard rate order,
MRL order), together with a nonparametric estimator.
Gumbel bivariate exponential, Farlie-Gumbel-Morgenstern (FGM), bivariate power, and Schur-constant distributions are built in.
plot_blt_residual and plot_blt_reversed provide
ready-made visualisations.
Maintainer: Mahesh Divakaran [email protected] (ORCID) (Amity School of Applied Sciences, Amity University Lucknow)
Authors:
S. Jayalekshmi (Department of Statistics, Cochin University of Science and Technology) [contributor]
G. Rajesh [email protected] (Department of Statistics, Cochin University of Science and Technology)
N. Unnikrishnan Nair (Department of Statistics, Cochin University of Science and Technology)
Jayalekshmi S., Rajesh G., Nair N.U. (2022). Bivariate Laplace transform of residual lives and their properties. *Communications in Statistics - Theory and Methods*. doi:10.1080/03610926.2022.2085874
Jayalekshmi S., Rajesh G., Nair N.U. (2022). Bivariate Laplace transform order and ordering of reversed residual lives. *International Journal of Reliability, Quality and Safety Engineering*. doi:10.1142/S0218539322500061
Belzunce F., Ortega E., Ruiz J.M. (1999). The Laplace order and ordering of residual lives. *Statistics & Probability Letters*, 42(2), 145–156. doi:10.1016/S0167-7152(98)00202-8
Golomb S.W. (1966). The information generating function of a probability distribution. *IEEE Transactions on Information Theory*, 12(1), 75–77.
Useful links:
Report bugs at https://github.com/itsmdivakaran/BivLaplaceRL/issues
Checks whether : the ratio
is increasing in .
biv_brlmr_order( surv_X, surv_Y, t2_fixed = 0.5, t1_grid = seq(0.2, 3, by = 0.3), tol = 1e-06 )biv_brlmr_order( surv_X, surv_Y, t2_fixed = 0.5, t1_grid = seq(0.2, 3, by = 0.3), tol = 1e-06 )
surv_X, surv_Y
|
Joint survival functions. |
t2_fixed |
Fixed value of |
t1_grid |
Grid of |
tol |
Tolerance. |
List with order_holds and ratio_values.
Kayid M., Izadkhah S., Alshami S. (2016). Residual probability function, associated orderings, and related aging classes. *Statistics and Probability Letters*, 116, 37–47.
sX <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 2, k2 = 1) sY <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1, k2 = 1) biv_brlmr_order(sX, sY, t2_fixed = 0.5)sX <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 2, k2 = 1) sY <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1, k2 = 1) biv_brlmr_order(sX, sY, t2_fixed = 0.5)
Computes the bivariate hazard gradient
biv_hazard_gradient( t1, t2, surv_fn = NULL, k1 = 1, k2 = 1, theta = 0, eps = 1e-07 )biv_hazard_gradient( t1, t2, surv_fn = NULL, k1 = 1, k2 = 1, theta = 0, eps = 1e-07 )
t1, t2
|
Evaluation points (non-negative). |
surv_fn |
A function |
k1, k2, theta
|
Parameters for the default Gumbel distribution. |
eps |
Step size for numerical differentiation (default |
A named numeric vector (h1, h2).
Jayalekshmi S., Rajesh G., Nair N.U. (2022). doi:10.1080/03610926.2022.2085874
biv_hazard_gradient(t1 = 1, t2 = 1) biv_hazard_gradient(t1 = 0.5, t2 = 0.5, k1 = 2, k2 = 1.5, theta = 0.3)biv_hazard_gradient(t1 = 1, t2 = 1) biv_hazard_gradient(t1 = 0.5, t2 = 0.5, k1 = 2, k2 = 1.5, theta = 0.3)
Computes the bivariate mean residual life (MRL) function
and analogously .
biv_mean_residual( t1, t2, surv_fn = NULL, k1 = 1, k2 = 1, theta = 0, upper = 100 )biv_mean_residual( t1, t2, surv_fn = NULL, k1 = 1, k2 = 1, theta = 0, upper = 100 )
t1, t2
|
Non-negative thresholds. |
surv_fn |
Joint survival function; defaults to Gumbel bivariate exponential. |
k1, k2, theta
|
Gumbel parameters (used when |
upper |
Upper integration bound (default |
A named numeric vector (m1, m2).
Jayalekshmi S., Rajesh G., Nair N.U. (2022). doi:10.1080/03610926.2022.2085874
biv_mean_residual(t1 = 0.5, t2 = 0.5) biv_mean_residual(t1 = 1, t2 = 0.5, k1 = 1, k2 = 2, theta = 0.2)biv_mean_residual(t1 = 0.5, t2 = 0.5) biv_mean_residual(t1 = 1, t2 = 0.5, k1 = 1, k2 = 2, theta = 0.2)
Computes the bivariate reversed hazard gradient
biv_rhazard_gradient(x1, x2, cdf_fn = NULL, theta = 0, eps = 1e-07)biv_rhazard_gradient(x1, x2, cdf_fn = NULL, theta = 0, eps = 1e-07)
x1, x2
|
Positive evaluation points. |
cdf_fn |
Joint CDF function; defaults to FGM with parameter
|
theta |
FGM parameter (used when |
eps |
Numerical differentiation step. |
Named numeric vector (rh1, rh2).
Jayalekshmi S., Rajesh G. — IJRQSE, Section 2.
biv_rhazard_gradient(x1 = 0.5, x2 = 0.5, theta = 0.3)biv_rhazard_gradient(x1 = 0.5, x2 = 0.5, theta = 0.3)
Computes the bivariate reversed mean residual life (RMRL):
biv_rmrl(x1, x2, cdf_fn = NULL, theta = 0)biv_rmrl(x1, x2, cdf_fn = NULL, theta = 0)
x1, x2
|
Positive evaluation points. |
cdf_fn |
Joint CDF; defaults to FGM. |
theta |
FGM parameter. |
Named numeric vector (m1, m2).
Jayalekshmi S., Rajesh G. — IJRQSE, Section 2.
biv_rmrl(x1 = 0.5, x2 = 0.5, theta = 0.3) biv_rmrl(x1 = 0.7, x2 = 0.4, theta = -0.2)biv_rmrl(x1 = 0.5, x2 = 0.5, theta = 0.3) biv_rmrl(x1 = 0.7, x2 = 0.4, theta = -0.2)
Checks whether : the ratio
is increasing in
, i.e.\ .
biv_whr_order( surv_X, surv_Y, t1_grid = seq(0.1, 3, by = 0.5), t2_grid = seq(0.1, 3, by = 0.5), tol = 1e-06 )biv_whr_order( surv_X, surv_Y, t1_grid = seq(0.1, 3, by = 0.5), t2_grid = seq(0.1, 3, by = 0.5), tol = 1e-06 )
surv_X, surv_Y
|
Joint survival functions. |
t1_grid, t2_grid
|
Evaluation grids. |
tol |
Tolerance. |
A list: order_holds (logical), violations (data frame).
Shaked M., Shanthikumar J.G. (2007). *Stochastic Orders*. Springer. Jayalekshmi S., Rajesh G., Nair N.U. (2022). doi:10.1080/03610926.2022.2085874
sX <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0) sY <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 2, k2 = 2, theta = 0) biv_whr_order(sX, sY)sX <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0) sY <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 2, k2 = 2, theta = 0) biv_whr_order(sX, sY)
Checks whether :
.
biv_wmrl_order( surv_X, surv_Y, t1_grid = seq(0.1, 2, by = 0.5), t2_grid = seq(0.1, 2, by = 0.5), tol = 1e-06 )biv_wmrl_order( surv_X, surv_Y, t1_grid = seq(0.1, 2, by = 0.5), t2_grid = seq(0.1, 2, by = 0.5), tol = 1e-06 )
surv_X, surv_Y
|
Joint survival functions. |
t1_grid, t2_grid
|
Evaluation grids. |
tol |
Tolerance. |
List with order_holds and violations.
Jayalekshmi S., Rajesh G., Nair N.U. (2022). doi:10.1080/03610926.2022.2085874
sX <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1.5, k2 = 1.5) sY <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1, k2 = 1) biv_wmrl_order(sX, sY)sX <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1.5, k2 = 1.5) sY <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1, k2 = 1) biv_wmrl_order(sX, sY)
Checks : the ratio
is decreasing in , i.e.\
.
biv_wrhr_order( cdf_X, cdf_Y, x1_grid = seq(0.1, 0.9, by = 0.2), x2_grid = seq(0.1, 0.9, by = 0.2), tol = 1e-06 )biv_wrhr_order( cdf_X, cdf_Y, x1_grid = seq(0.1, 0.9, by = 0.2), x2_grid = seq(0.1, 0.9, by = 0.2), tol = 1e-06 )
cdf_X, cdf_Y
|
Joint CDFs. |
x1_grid, x2_grid
|
Evaluation grids (positive values). |
tol |
Tolerance. |
List with order_holds and violations.
Jayalekshmi S., Rajesh G. — IJRQSE, Section 2.
cX <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.2) cY <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.5) biv_wrhr_order(cX, cY)cX <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.2) cY <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.5) biv_wrhr_order(cX, cY)
Checks :
.
biv_wrmrl_order( cdf_X, cdf_Y, x1_grid = seq(0.2, 0.8, by = 0.2), x2_grid = seq(0.2, 0.8, by = 0.2), tol = 1e-06 )biv_wrmrl_order( cdf_X, cdf_Y, x1_grid = seq(0.2, 0.8, by = 0.2), x2_grid = seq(0.2, 0.8, by = 0.2), tol = 1e-06 )
cdf_X, cdf_Y
|
Joint CDFs. |
x1_grid, x2_grid
|
Evaluation grids. |
tol |
Tolerance. |
List with order_holds and violations.
Jayalekshmi S., Rajesh G. — IJRQSE, Section 2.
cX <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.1) cY <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.8) biv_wrmrl_order(cX, cY)cX <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.1) cY <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.8) biv_wrmrl_order(cX, cY)
Distribution function, survival function, density, and random generation for the bivariate power distribution:
pbivpower(x1, x2, p1 = 1, p2 = 1, theta = 0) sbivpower(x1, x2, p1 = 1, p2 = 1, theta = 0) dbivpower(x1, x2, p1 = 1, p2 = 1, theta = 0) rbivpower(n, p1 = 1, p2 = 1, theta = 0)pbivpower(x1, x2, p1 = 1, p2 = 1, theta = 0) sbivpower(x1, x2, p1 = 1, p2 = 1, theta = 0) dbivpower(x1, x2, p1 = 1, p2 = 1, theta = 0) rbivpower(n, p1 = 1, p2 = 1, theta = 0)
x1, x2
|
Values in the support. |
p1, p2
|
Positive shape parameters. |
theta |
Association parameter, |
n |
Number of random observations. |
Numeric vector or two-column matrix (rbivpower).
Jayalekshmi S., Rajesh G. Bivariate Laplace transform order and ordering of reversed residual lives. *International Journal of Reliability, Quality and Safety Engineering*.
pbivpower(0.4, 0.5, p1 = 2, p2 = 2, theta = 0.3) set.seed(7); head(rbivpower(30, p1 = 2, p2 = 2, theta = 0.2))pbivpower(0.4, 0.5, p1 = 2, p2 = 2, theta = 0.3) set.seed(7); head(rbivpower(30, p1 = 2, p2 = 2, theta = 0.2))
Checks whether random vector is smaller than in the
bivariate Laplace transform order of residual lives (BLt-rl).
if and only if for all
in the support:
i.e.\ for all
. The function evaluates this inequality at a grid.
blt_order_residual( surv_X, surv_Y, s1 = 1, s2 = 1, t1_grid = seq(0.1, 3, by = 0.5), t2_grid = seq(0.1, 3, by = 0.5), tol = 1e-06 )blt_order_residual( surv_X, surv_Y, s1 = 1, s2 = 1, t1_grid = seq(0.1, 3, by = 0.5), t2_grid = seq(0.1, 3, by = 0.5), tol = 1e-06 )
surv_X, surv_Y
|
Joint survival functions for |
s1, s2
|
Laplace parameters to evaluate at. |
t1_grid, t2_grid
|
Grids of truncation times (default 0.1 to 3). |
tol |
Tolerance for declaring inequality (default |
A list with elements:
order_holdsLogical; TRUE if at all
grid points.
violationsData frame of grid points where the ordering fails.
ratio_matrixMatrix of values.
Jayalekshmi S., Rajesh G., Nair N.U. (2022), Definition 4.1 & Prop. 4.1. doi:10.1080/03610926.2022.2085874
# Compare two Gumbel distributions sX <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0.2) sY <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 2, k2 = 2, theta = 0.2) blt_order_residual(sX, sY, s1 = 1, s2 = 1, t1_grid = c(0.1, 0.5, 1), t2_grid = c(0.1, 0.5))# Compare two Gumbel distributions sX <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0.2) sY <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 2, k2 = 2, theta = 0.2) blt_order_residual(sX, sY, s1 = 1, s2 = 1, t1_grid = c(0.1, 0.5, 1), t2_grid = c(0.1, 0.5))
Checks whether : for all
, .
blt_order_reversed( cdf_X, cdf_Y, s1 = 1, s2 = 1, t1_grid = seq(0.2, 0.8, by = 0.2), t2_grid = seq(0.2, 0.8, by = 0.2), tol = 1e-06 )blt_order_reversed( cdf_X, cdf_Y, s1 = 1, s2 = 1, t1_grid = seq(0.2, 0.8, by = 0.2), t2_grid = seq(0.2, 0.8, by = 0.2), tol = 1e-06 )
cdf_X, cdf_Y
|
Joint CDF functions for |
s1, s2
|
Laplace parameters. |
t1_grid, t2_grid
|
Grids of truncation times. |
tol |
Tolerance. |
Same structure as blt_order_residual.
Jayalekshmi S., Rajesh G. — IJRQSE, Definition 2.
cX <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.3) cY <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.5) blt_order_reversed(cX, cY, s1 = 1, s2 = 1, t1_grid = c(0.2, 0.5), t2_grid = c(0.2, 0.5))cX <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.3) cY <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.5) blt_order_reversed(cX, cY, s1 = 1, s2 = 1, t1_grid = c(0.2, 0.5), t2_grid = c(0.2, 0.5))
Computes the bivariate Laplace transform of residual lives
and defined as
and analogously for the second component.
The *star* version (used for ordering) is
blt_residual( s1, s2, t1 = 0, t2 = 0, surv_fn = NULL, k1 = 1, k2 = 1, theta = 0, upper = 50, star = FALSE )blt_residual( s1, s2, t1 = 0, t2 = 0, surv_fn = NULL, k1 = 1, k2 = 1, theta = 0, upper = 50, star = FALSE )
s1, s2
|
Positive Laplace parameters. |
t1, t2
|
Non-negative time thresholds (truncation ages). |
surv_fn |
A function |
k1, k2
|
Rate parameters (used only when |
theta |
Association parameter (used only when |
upper |
Integration upper bound (default |
star |
Logical; if |
A named numeric vector with elements L1 and L2
(or L1_star and L2_star when star = TRUE).
Jayalekshmi S., Rajesh G., Nair N.U. (2022). doi:10.1080/03610926.2022.2085874
blt_residual_gumbel, blt_order_residual,
np_blt_residual
# Gumbel bivariate exponential, default parameters blt_residual(s1 = 1, s2 = 1, t1 = 0.5, t2 = 0.5) # Star version used in ordering blt_residual(s1 = 0.5, s2 = 0.5, t1 = 1, t2 = 1, star = TRUE) # User-supplied survival function (Schur-constant exponential) surv <- function(x1, x2) exp(-(x1 + x2)) blt_residual(s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3, surv_fn = surv)# Gumbel bivariate exponential, default parameters blt_residual(s1 = 1, s2 = 1, t1 = 0.5, t2 = 0.5) # Star version used in ordering blt_residual(s1 = 0.5, s2 = 0.5, t1 = 1, t2 = 1, star = TRUE) # User-supplied survival function (Schur-constant exponential) surv <- function(x1, x2) exp(-(x1 + x2)) blt_residual(s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3, surv_fn = surv)
Returns the *star* bivariate Laplace transform of residual lives for the Gumbel bivariate exponential distribution in closed form:
blt_residual_gumbel(s1, s2, t1 = 0, t2 = 0, k1 = 1, k2 = 1, theta = 0)blt_residual_gumbel(s1, s2, t1 = 0, t2 = 0, k1 = 1, k2 = 1, theta = 0)
s1, s2
|
Positive Laplace parameters. |
t1, t2
|
Non-negative truncation ages. |
k1, k2
|
Positive rate parameters. |
theta |
Non-negative association parameter. |
A named numeric vector (L1_star, L2_star).
Jayalekshmi S., Rajesh G., Nair N.U. (2022), Example 3.1. doi:10.1080/03610926.2022.2085874
blt_residual_gumbel(s1 = 1, s2 = 1, t1 = 0.5, t2 = 0.5) blt_residual_gumbel(s1 = 2, s2 = 0.5, t1 = 0, t2 = 1, k1 = 2, k2 = 1, theta = 0.3)blt_residual_gumbel(s1 = 1, s2 = 1, t1 = 0.5, t2 = 0.5) blt_residual_gumbel(s1 = 2, s2 = 0.5, t1 = 0, t2 = 1, k1 = 2, k2 = 1, theta = 0.3)
Computes the bivariate Laplace transform of reversed (past) residual lives.
For a random pair with joint distribution function
, the transform is
and the associated function (useful for ordering) is
blt_reversed(s1, s2, t1, t2, cdf_fn = NULL, theta = 0, g_form = FALSE)blt_reversed(s1, s2, t1, t2, cdf_fn = NULL, theta = 0, g_form = FALSE)
s1, s2
|
Positive Laplace parameters. |
t1, t2
|
Positive truncation times ( |
cdf_fn |
A function |
theta |
FGM association parameter (used when |
g_form |
Logical; if |
A named numeric vector (L1, L2) or (G1, G2).
Jayalekshmi S., Rajesh G. Bivariate Laplace transform order and ordering of reversed residual lives. *International Journal of Reliability, Quality and Safety Engineering*.
blt_reversed_fgm, blt_order_reversed
# FGM distribution (default) blt_reversed(s1 = 1, s2 = 1, t1 = 0.6, t2 = 0.6) # G form blt_reversed(s1 = 1, s2 = 1, t1 = 0.6, t2 = 0.6, g_form = TRUE) # User-supplied CDF cdf <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.5) blt_reversed(s1 = 1, s2 = 1, t1 = 0.5, t2 = 0.5, cdf_fn = cdf)# FGM distribution (default) blt_reversed(s1 = 1, s2 = 1, t1 = 0.6, t2 = 0.6) # G form blt_reversed(s1 = 1, s2 = 1, t1 = 0.6, t2 = 0.6, g_form = TRUE) # User-supplied CDF cdf <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.5) blt_reversed(s1 = 1, s2 = 1, t1 = 0.5, t2 = 0.5, cdf_fn = cdf)
Computes the bivariate Laplace transform of the FGM distribution in closed form (Jayalekshmi and Rajesh, Example 1):
where captures the dependence correction.
blt_reversed_fgm(s1, s2, theta = 0)blt_reversed_fgm(s1, s2, theta = 0)
s1, s2
|
Positive Laplace parameters. |
theta |
FGM association parameter, |
Scalar numeric; the joint bivariate Laplace transform.
Jayalekshmi S., Rajesh G. Bivariate Laplace transform order and ordering of reversed residual lives. *International Journal of Reliability, Quality and Safety Engineering*, Example 1.
blt_reversed_fgm(s1 = 1, s2 = 1, theta = 0.5) blt_reversed_fgm(s1 = 2, s2 = 0.5, theta = -0.3)blt_reversed_fgm(s1 = 1, s2 = 1, theta = 0.5) blt_reversed_fgm(s1 = 2, s2 = 0.5, theta = -0.3)
Computes the function for the bivariate power distribution:
evaluated numerically.
blt_reversed_power(s1, t1, t2, p1 = 1, p2 = 1, theta = 0)blt_reversed_power(s1, t1, t2, p1 = 1, p2 = 1, theta = 0)
s1 |
Positive Laplace parameter. |
t1, t2
|
Positive truncation times. |
p1, p2
|
Positive shape parameters. |
theta |
Association parameter, |
Named numeric vector (G1, reversed_hazard_h1).
Jayalekshmi S., Rajesh G. — IJRQSE, Example 2.
blt_reversed_power(s1 = 1, t1 = 0.5, t2 = 0.5, p1 = 2, p2 = 2, theta = 0.3)blt_reversed_power(s1 = 1, t1 = 0.5, t2 = 0.5, p1 = 2, p2 = 2, theta = 0.3)
Density, distribution function, survival function, and random generation for
the FGM bivariate distribution on :
pfgm_biv(x1, x2, theta = 0) dfgm_biv(x1, x2, theta = 0) sfgm_biv(x1, x2, theta = 0) rfgm_biv(n, theta = 0)pfgm_biv(x1, x2, theta = 0) dfgm_biv(x1, x2, theta = 0) sfgm_biv(x1, x2, theta = 0) rfgm_biv(n, theta = 0)
x1, x2
|
Values in |
theta |
Association parameter, |
n |
Number of random observations. |
Numeric vector (scalar functions) or two-column matrix
(rfgm_biv).
Jayalekshmi S., Rajesh G. Bivariate Laplace transform order and ordering of reversed residual lives. *International Journal of Reliability, Quality and Safety Engineering*.
pfgm_biv(0.4, 0.6, theta = 0.5) dfgm_biv(0.4, 0.6, theta = 0.5) set.seed(1); head(rfgm_biv(50, theta = 0.5))pfgm_biv(0.4, 0.6, theta = 0.5) dfgm_biv(0.4, 0.6, theta = 0.5) set.seed(1); head(rfgm_biv(50, theta = 0.5))
Density, distribution (survival) function, and random generation for the
Gumbel bivariate exponential distribution with parameters ,
, and association parameter .
The joint survival function is
dgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0, log.p = FALSE) sgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0, log.p = FALSE) pgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0) rgumbel_biv(n, k1 = 1, k2 = 1, theta = 0)dgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0, log.p = FALSE) sgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0, log.p = FALSE) pgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0) rgumbel_biv(n, k1 = 1, k2 = 1, theta = 0)
x1, x2
|
Non-negative numeric values or vectors. |
k1, k2
|
Positive rate parameters. |
theta |
Non-negative association parameter; must satisfy
|
log.p |
Logical; if |
n |
Number of random observations. |
dgumbel_bivNumeric vector of density values.
pgumbel_bivNumeric vector of joint CDF values.
sgumbel_bivNumeric vector of joint survival function values.
rgumbel_bivA two-column matrix with columns X1 and
X2 containing the simulated observations.
Gumbel E.J. (1960). Bivariate exponential distributions. *Journal of the American Statistical Association*, 55(292), 698–707.
Jayalekshmi S., Rajesh G., Nair N.U. (2022). doi:10.1080/03610926.2022.2085874
# Survival function sgumbel_biv(1, 2, k1 = 1, k2 = 1, theta = 0.5) # Density dgumbel_biv(0.5, 0.5, k1 = 1, k2 = 1.5, theta = 0.3) # Random sample set.seed(42) dat <- rgumbel_biv(100, k1 = 1, k2 = 1, theta = 0.5) head(dat)# Survival function sgumbel_biv(1, 2, k1 = 1, k2 = 1, theta = 0.5) # Density dgumbel_biv(0.5, 0.5, k1 = 1, k2 = 1.5, theta = 0.3) # Random sample set.seed(42) dat <- rgumbel_biv(100, k1 = 1, k2 = 1, theta = 0.5) head(dat)
Computes the hazard rate (failure rate) of a non-negative continuous random variable:
hazard_rate(dens_fn, surv_fn = NULL, t, upper = 100)hazard_rate(dens_fn, surv_fn = NULL, t, upper = 100)
dens_fn |
Density function |
surv_fn |
Survival function |
t |
Scalar or numeric vector of time points. |
upper |
Upper integration limit (used only when |
Numeric vector of hazard rates at t.
# Exp(1): constant hazard rate = 1 f <- function(x) dexp(x, 1) Fb <- function(x) pexp(x, 1, lower.tail = FALSE) hazard_rate(f, Fb, t = c(0.5, 1, 2)) # Gamma(2,1): increasing hazard rate fG <- function(x) dgamma(x, shape = 2, rate = 1) FbG <- function(x) pgamma(x, shape = 2, rate = 1, lower.tail = FALSE) hazard_rate(fG, FbG, t = c(0.5, 1, 2))# Exp(1): constant hazard rate = 1 f <- function(x) dexp(x, 1) Fb <- function(x) pexp(x, 1, lower.tail = FALSE) hazard_rate(f, Fb, t = c(0.5, 1, 2)) # Gamma(2,1): increasing hazard rate fG <- function(x) dgamma(x, shape = 2, rate = 1) FbG <- function(x) pgamma(x, shape = 2, rate = 1, lower.tail = FALSE) hazard_rate(fG, FbG, t = c(0.5, 1, 2))
Checks whether (hazard rate order): the hazard
rate of is pointwise no greater than that of :
Under this order is stochastically longer-lived than .
For exponential distributions, iff .
hr_order( dens_fn_X, surv_fn_X = NULL, dens_fn_Y, surv_fn_Y = NULL, t_grid = seq(0.1, 3, by = 0.5), upper = 100 )hr_order( dens_fn_X, surv_fn_X = NULL, dens_fn_Y, surv_fn_Y = NULL, t_grid = seq(0.1, 3, by = 0.5), upper = 100 )
dens_fn_X, dens_fn_Y
|
Density functions of |
surv_fn_X, surv_fn_Y
|
Survival functions; computed if |
t_grid |
Grid of time points. |
upper |
Integration upper bound. |
A list with:
order_holdsLogical.
max_violationMaximum of over the
grid.
hazard_XHazard rate of at t_grid.
hazard_YHazard rate of at t_grid.
hazard_rate, mrl_order,
lt_rl_order
# Exp(1) <=_hr Exp(2): h_X(t)=1 <= 2=h_Y(t) fX <- function(x) dexp(x, 1) FbX <- function(x) pexp(x, 1, lower.tail = FALSE) fY <- function(x) dexp(x, 2) FbY <- function(x) pexp(x, 2, lower.tail = FALSE) hr_order(fX, FbX, fY, FbY, t_grid = c(0.5, 1, 2))$order_holds# Exp(1) <=_hr Exp(2): h_X(t)=1 <= 2=h_Y(t) fX <- function(x) dexp(x, 1) FbX <- function(x) pexp(x, 1, lower.tail = FALSE) fY <- function(x) dexp(x, 2) FbY <- function(x) pexp(x, 2, lower.tail = FALSE) hr_order(fX, FbX, fY, FbY, t_grid = c(0.5, 1, 2))$order_holds
Computes the information generating function (IGF) introduced by Golomb (1966):
When ,
.
info_gen_function(dens_fn, alpha = 1, upper = 100)info_gen_function(dens_fn, alpha = 1, upper = 100)
dens_fn |
A function of one argument returning the density. |
alpha |
Positive parameter (default 1). |
upper |
Upper integration limit. |
Scalar numeric.
Golomb S.W. (1966). The information generating function of a probability distribution. *IEEE Transactions on Information Theory*, 12(1), 75–77.
# Exponential(1) with alpha=1 gives 1 info_gen_function(function(x) dexp(x, rate = 1), alpha = 1) # alpha = 2 info_gen_function(function(x) dexp(x, rate = 1), alpha = 2)# Exponential(1) with alpha=1 gives 1 info_gen_function(function(x) dexp(x, rate = 1), alpha = 1) # alpha = 2 info_gen_function(function(x) dexp(x, rate = 1), alpha = 2)
Computes the Laplace transform of the residual life of a non-negative
continuous random variable conditioned on survival past time :
At this reduces to the standard Laplace transform
.
lt_residual(dens_fn, surv_fn = NULL, s, t = 0, upper = 100)lt_residual(dens_fn, surv_fn = NULL, s, t = 0, upper = 100)
dens_fn |
Density function |
surv_fn |
Survival function |
s |
Non-negative Laplace parameter. |
t |
Truncation time (default 0). |
upper |
Upper integration limit. |
Scalar numeric.
Belzunce F., Ortega E., Ruiz J.M. (1999). The Laplace order and ordering of residual lives. *Statistics & Probability Letters*, 42(2), 145–156.
hazard_rate, mean_residual,
np_lt_residual, lt_rl_order,
blt_residual
# Exp(1): L_X(s, 0) = 1/(1+s) = 0.5 at s=1 f <- function(x) dexp(x, 1) Fb <- function(x) pexp(x, 1, lower.tail = FALSE) lt_residual(f, Fb, s = 1, t = 0) # Memoryless property: L_X(s,t) should equal L_X(s,0) for Exp lt_residual(f, Fb, s = 1, t = 0.5)# Exp(1): L_X(s, 0) = 1/(1+s) = 0.5 at s=1 f <- function(x) dexp(x, 1) Fb <- function(x) pexp(x, 1, lower.tail = FALSE) lt_residual(f, Fb, s = 1, t = 0) # Memoryless property: L_X(s,t) should equal L_X(s,0) for Exp lt_residual(f, Fb, s = 1, t = 0.5)
Checks whether : the Laplace transform of
the residual life of is dominated by that of pointwise
over a grid of values:
The order is verified numerically on s_grid x t_grid.
lt_rl_order( dens_fn_X, surv_fn_X = NULL, dens_fn_Y, surv_fn_Y = NULL, s_grid = seq(0.5, 3, by = 0.5), t_grid = seq(0, 2, by = 0.5), upper = 100 )lt_rl_order( dens_fn_X, surv_fn_X = NULL, dens_fn_Y, surv_fn_Y = NULL, s_grid = seq(0.5, 3, by = 0.5), t_grid = seq(0, 2, by = 0.5), upper = 100 )
dens_fn_X, dens_fn_Y
|
Density functions of |
surv_fn_X, surv_fn_Y
|
Survival functions; computed if |
s_grid |
Numeric vector of Laplace parameter values to check. |
t_grid |
Numeric vector of truncation times to check. |
upper |
Integration upper bound. |
A list with:
order_holdsLogical; TRUE if the order holds at all
grid points.
max_violationMaximum violation .
ratio_matrixMatrix of values
(rows = s_grid, columns = t_grid).
lt_residual, hr_order,
mrl_order, blt_order_residual
# Exp(1) <=_Lt-rl Exp(2): L_{Exp(lambda)}(s,t) = lambda*exp(-s*t)/(s+lambda) # For s>0: 1/(s+1) < 2/(s+2), so Exp(1) has smaller LT of residual life fX <- function(x) dexp(x, 1) FbX <- function(x) pexp(x, 1, lower.tail = FALSE) fY <- function(x) dexp(x, 2) FbY <- function(x) pexp(x, 2, lower.tail = FALSE) lt_rl_order(fX, FbX, fY, FbY, s_grid = c(0.5, 1, 2), t_grid = c(0, 0.5, 1))$order_holds# Exp(1) <=_Lt-rl Exp(2): L_{Exp(lambda)}(s,t) = lambda*exp(-s*t)/(s+lambda) # For s>0: 1/(s+1) < 2/(s+2), so Exp(1) has smaller LT of residual life fX <- function(x) dexp(x, 1) FbX <- function(x) pexp(x, 1, lower.tail = FALSE) fY <- function(x) dexp(x, 2) FbY <- function(x) pexp(x, 2, lower.tail = FALSE) lt_rl_order(fX, FbX, fY, FbY, s_grid = c(0.5, 1, 2), t_grid = c(0, 0.5, 1))$order_holds
Computes the mean residual life (mean excess function):
mean_residual(surv_fn, t = 0, upper = 100)mean_residual(surv_fn, t = 0, upper = 100)
surv_fn |
Survival function |
t |
Scalar or numeric vector of time points. |
upper |
Upper integration limit. |
Numeric vector of MRL values at t.
# Exp(1): constant MRL = 1 (memoryless) Fb <- function(x) pexp(x, 1, lower.tail = FALSE) mean_residual(Fb, t = c(0, 0.5, 1, 2)) # Gamma(2,1): decreasing MRL FbG <- function(x) pgamma(x, shape = 2, rate = 1, lower.tail = FALSE) mean_residual(FbG, t = c(0, 0.5, 1, 2))# Exp(1): constant MRL = 1 (memoryless) Fb <- function(x) pexp(x, 1, lower.tail = FALSE) mean_residual(Fb, t = c(0, 0.5, 1, 2)) # Gamma(2,1): decreasing MRL FbG <- function(x) pgamma(x, shape = 2, rate = 1, lower.tail = FALSE) mean_residual(FbG, t = c(0, 0.5, 1, 2))
Checks whether (mean residual life order): the MRL
of is pointwise no greater than that of :
mrl_order(surv_fn_X, surv_fn_Y, t_grid = seq(0, 3, by = 0.5), upper = 100)mrl_order(surv_fn_X, surv_fn_Y, t_grid = seq(0, 3, by = 0.5), upper = 100)
surv_fn_X, surv_fn_Y
|
Survival functions of |
t_grid |
Grid of time points. |
upper |
Integration upper bound. |
A list with:
order_holdsLogical.
max_violationMaximum of over the
grid.
mrl_XMRL of at t_grid.
mrl_YMRL of at t_grid.
mean_residual, hr_order,
lt_rl_order
# Exp(2) <=_mrl Exp(1): m_X(t)=0.5 <= 1=m_Y(t) FbX <- function(x) pexp(x, 2, lower.tail = FALSE) FbY <- function(x) pexp(x, 1, lower.tail = FALSE) mrl_order(FbX, FbY, t_grid = c(0, 0.5, 1, 2))$order_holds# Exp(2) <=_mrl Exp(1): m_X(t)=0.5 <= 1=m_Y(t) FbX <- function(x) pexp(x, 2, lower.tail = FALSE) FbY <- function(x) pexp(x, 1, lower.tail = FALSE) mrl_order(FbX, FbY, t_grid = c(0, 0.5, 1, 2))$order_holds
Checks whether a bivariate lifetime distribution belongs to the NBUHR (New Better than Used in Hazard Rate) or NWUHR (New Worse than Used) aging class. A distribution is NBUHR if
and similarly for the second component. The function evaluates this at a
grid of values.
nbuhr_test( t2 = 1, t1_grid = seq(0.1, 5, by = 0.1), surv_fn = NULL, k1 = 1, k2 = 1, theta = 0 )nbuhr_test( t2 = 1, t1_grid = seq(0.1, 5, by = 0.1), surv_fn = NULL, k1 = 1, k2 = 1, theta = 0 )
t2 |
Fixed value of the second age coordinate. |
t1_grid |
Numeric vector of |
surv_fn |
Joint survival function; defaults to Gumbel bivariate exponential. |
k1, k2, theta
|
Gumbel parameters. |
A list with components:
class1Character: "NBUHR", "NWUHR", or
"neither" for the first component.
class2Same for the second component.
h1_gridNumeric vector of values.
h2_gridNumeric vector of values.
Jayalekshmi S., Rajesh G., Nair N.U. (2022), Definition 3.2. doi:10.1080/03610926.2022.2085874
nbuhr_test(t2 = 1, k1 = 1, k2 = 1, theta = 0.3) nbuhr_test(t2 = 0.5, surv_fn = function(x1, x2) exp(-(x1 + x2)))nbuhr_test(t2 = 1, k1 = 1, k2 = 1, theta = 0.3) nbuhr_test(t2 = 0.5, surv_fn = function(x1, x2) exp(-(x1 + x2)))
Given a bivariate sample , estimates
and analogously for the second component, using the empirical survival function as described in Jayalekshmi et al. (2022), Section 6.
np_blt_residual(data, s1, s2, t1 = 0, t2 = 0)np_blt_residual(data, s1, s2, t1 = 0, t2 = 0)
data |
A two-column numeric matrix or data frame with columns for
|
s1, s2
|
Positive Laplace parameters. |
t1, t2
|
Non-negative truncation ages. |
A named numeric vector (L1_hat, L2_hat).
Jayalekshmi S., Rajesh G., Nair N.U. (2022), Section 6. doi:10.1080/03610926.2022.2085874
blt_residual_gumbel, sim_blt_residual
set.seed(123) dat <- rgumbel_biv(200, k1 = 1, k2 = 1, theta = 0.5) np_blt_residual(dat, s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3) # Compare with closed form blt_residual_gumbel(s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3, theta = 0.5)set.seed(123) dat <- rgumbel_biv(200, k1 = 1, k2 = 1, theta = 0.5) np_blt_residual(dat, s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3) # Compare with closed form blt_residual_gumbel(s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3, theta = 0.5)
Given a sample , estimates the Laplace transform of
the residual life using the empirical survival function:
np_lt_residual(x, s, t = 0)np_lt_residual(x, s, t = 0)
x |
Numeric vector; observed sample. |
s |
Non-negative Laplace parameter. |
t |
Truncation time (default 0). |
Scalar numeric estimate of .
set.seed(1) x <- rexp(300, rate = 1) # Estimate at s=1, t=0: true value 1/(1+1) = 0.5 np_lt_residual(x, s = 1, t = 0) # Estimate at s=1, t=0.5: true value still approx 0.5 (memoryless) np_lt_residual(x, s = 1, t = 0.5)set.seed(1) x <- rexp(300, rate = 1) # Estimate at s=1, t=0: true value 1/(1+1) = 0.5 np_lt_residual(x, s = 1, t = 0) # Estimate at s=1, t=0.5: true value still approx 0.5 (memoryless) np_lt_residual(x, s = 1, t = 0.5)
Plots the star Laplace transform of residual lives
as a function of for fixed
, . Optionally overlays two distributions for
visual comparison of the BLt-rl order.
plot_blt_residual( surv_fn, surv_fn2 = NULL, s1 = 1, t2 = 0.5, t1_grid = seq(0.1, 3, by = 0.1), k1 = 1, k2 = 1, theta = 0, xlab = expression(t[1]), ylab = expression(L^"*"[X[t[1] * "|" * t[2]]](s[1])), main = "Bivariate LT of Residual Lives", col1 = "steelblue", col2 = "firebrick", lwd = 2, legend_labels = c("Distribution 1", "Distribution 2") )plot_blt_residual( surv_fn, surv_fn2 = NULL, s1 = 1, t2 = 0.5, t1_grid = seq(0.1, 3, by = 0.1), k1 = 1, k2 = 1, theta = 0, xlab = expression(t[1]), ylab = expression(L^"*"[X[t[1] * "|" * t[2]]](s[1])), main = "Bivariate LT of Residual Lives", col1 = "steelblue", col2 = "firebrick", lwd = 2, legend_labels = c("Distribution 1", "Distribution 2") )
surv_fn |
Joint survival function. If a second distribution is to be
overlaid, pass it as |
surv_fn2 |
Optional second survival function for comparison. |
s1 |
Laplace parameter (default 1). |
t2 |
Fixed second truncation age (default 0.5). |
t1_grid |
Grid of first truncation ages. |
k1, k2, theta
|
Parameters for the default Gumbel distribution; used
only when |
xlab, ylab, main
|
Plot labels. |
col1, col2
|
Line colours. |
lwd |
Line width. |
legend_labels |
Length-2 character vector for legend (ignored if
|
Invisibly returns the data frame used for plotting.
sX <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0.3) sY <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 2, k2 = 1, theta = 0.3) plot_blt_residual(sX, sY, s1 = 1, t2 = 0.5, legend_labels = c("k1=1", "k1=2"))sX <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 1, k2 = 1, theta = 0.3) sY <- function(x1, x2) sgumbel_biv(x1, x2, k1 = 2, k2 = 1, theta = 0.3) plot_blt_residual(sX, sY, s1 = 1, t2 = 0.5, legend_labels = c("k1=1", "k1=2"))
Plots the reversed-life Laplace transform as a
function of for fixed and .
plot_blt_reversed( cdf_fn, cdf_fn2 = NULL, s1 = 1, t2 = 0.5, t1_grid = seq(0.1, 0.9, by = 0.05), theta = 0, xlab = expression(t[1]), ylab = expression(L[t[1] * "|" * t[2]](s[1])), main = "Bivariate LT of Reversed Residual Lives", col1 = "darkgreen", col2 = "darkorange", lwd = 2, legend_labels = c("Distribution 1", "Distribution 2") )plot_blt_reversed( cdf_fn, cdf_fn2 = NULL, s1 = 1, t2 = 0.5, t1_grid = seq(0.1, 0.9, by = 0.05), theta = 0, xlab = expression(t[1]), ylab = expression(L[t[1] * "|" * t[2]](s[1])), main = "Bivariate LT of Reversed Residual Lives", col1 = "darkgreen", col2 = "darkorange", lwd = 2, legend_labels = c("Distribution 1", "Distribution 2") )
cdf_fn |
Joint CDF function. |
cdf_fn2 |
Optional second CDF for comparison. |
s1 |
Laplace parameter. |
t2 |
Fixed second truncation time. |
t1_grid |
Grid of first truncation times. |
theta |
FGM parameter (used if |
xlab, ylab, main
|
Plot labels. |
col1, col2
|
Line colours. |
lwd |
Line width. |
legend_labels |
Legend labels. |
Invisibly returns the data frame used for plotting.
cX <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.2) cY <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.7) plot_blt_reversed(cX, cY, s1 = 1, t2 = 0.5, legend_labels = c("theta=0.2", "theta=0.7"))cX <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.2) cY <- function(x1, x2) pfgm_biv(x1, x2, theta = 0.7) plot_blt_reversed(cX, cY, s1 = 1, t2 = 0.5, legend_labels = c("theta=0.2", "theta=0.7"))
Random generation and survival function for a Schur-constant bivariate distribution with survival function
where is a given univariate survival function. The default marginal
is exponential with rate lambda.
sschur_biv(x1, x2, lambda = 1) rschur_biv(n, lambda = 1)sschur_biv(x1, x2, lambda = 1) rschur_biv(n, lambda = 1)
x1, x2
|
Non-negative values. |
lambda |
Exponential rate parameter for the generating survival function. |
n |
Number of random observations. |
Numeric vector (sschur_biv) or two-column matrix
(rschur_biv).
Barlow R.E., Mendel M.B. (1992). De Finetti-type representations for life distributions. *Journal of the American Statistical Association*, 87(420), 1116–1122.
sschur_biv(0.5, 1, lambda = 1) set.seed(2); head(rschur_biv(40, lambda = 1))sschur_biv(0.5, 1, lambda = 1) set.seed(2); head(rschur_biv(40, lambda = 1))
Computes the Shannon differential entropy
for a non-negative continuous random variable with density dens_fn.
shannon_entropy(dens_fn, upper = 100)shannon_entropy(dens_fn, upper = 100)
dens_fn |
A function of one argument returning the density |
upper |
Upper integration limit (default 100). |
Scalar numeric.
Shannon C.E. (1948). A mathematical theory of communication. *Bell System Technical Journal*, 27(3), 379–423.
# Exponential(1): H = 1 shannon_entropy(function(x) dexp(x, rate = 1)) # Exponential(2): H = 1 - log(2) shannon_entropy(function(x) dexp(x, rate = 2))# Exponential(1): H = 1 shannon_entropy(function(x) dexp(x, rate = 1)) # Exponential(2): H = 1 - log(2) shannon_entropy(function(x) dexp(x, rate = 2))
Evaluates the performance of np_blt_residual via repeated
simulation from the Gumbel bivariate exponential distribution and compares
estimates to the closed-form blt_residual_gumbel values.
Returns bias, variance, and mean squared error (MSE).
sim_blt_residual( n_obs = 200, n_sim = 100, s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3, k1 = 1, k2 = 1, theta = 0.5, seed = 42L )sim_blt_residual( n_obs = 200, n_sim = 100, s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3, k1 = 1, k2 = 1, theta = 0.5, seed = 42L )
n_obs |
Sample size per replicate. |
n_sim |
Number of simulation replicates. |
s1, s2
|
Laplace parameters. |
t1, t2
|
Truncation ages. |
k1, k2, theta
|
Gumbel parameters. |
seed |
Random seed for reproducibility. |
A data frame with columns component, true_value,
mean_est, bias, variance, mse.
Jayalekshmi S., Rajesh G., Nair N.U. (2022), Section 6. doi:10.1080/03610926.2022.2085874
sim_blt_residual(n_obs = 100, n_sim = 50, s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3, k1 = 1, k2 = 1, theta = 0.5)sim_blt_residual(n_obs = 100, n_sim = 50, s1 = 1, s2 = 1, t1 = 0.3, t2 = 0.3, k1 = 1, k2 = 1, theta = 0.5)