| Title: | Inverse Gaussian Process Degradation Models with Frailty |
|---|---|
| Description: | Maximum likelihood estimation and reliability inference for Inverse Gaussian Process (IGP) degradation models with gamma and inverse Gaussian frailty terms, as formulated by Morita et al. (2021) <doi:10.1002/qre.2762>. Classical IGP degradation models are described in Wasan (1968) and Meeker and Escobar (1998, ISBN:978-0471143284). The package provides tools for calculating lifetime cumulative distribution functions, probability density functions, lifetime quantiles with confidence intervals, posterior individual unit frailties, and goodness-of-fit diagnostics. |
| Authors: | Shikhar Tyagi [aut, cre] (ORCID: <https://orcid.org/0000-0003-1606-0844>), Vrijesh Tripathi [aut] |
| Maintainer: | Shikhar Tyagi <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 0.1.0 |
| Built: | 2026-10-13 11:28:47 UTC |
| Source: | https://github.com/cran/IGPFrailty |
Evaluates the Anderson-Darling goodness-of-fit test for Inverse Gaussian degradation increments and computes Likelihood Ratio Tests (LRT) for nested frailty models.
ad_test_ig(dy, dg, eta) lr_test(model0, model1)ad_test_ig(dy, dg, eta) lr_test(model0, model1)
dy |
Numeric vector of observed degradation increments. |
dg |
Numeric vector of evaluated mean function increments |
eta |
Precision/scale parameter |
model0, model1
|
Fitted objects of class |
The Anderson-Darling statistic tests the null hypothesis that the observed
degradation increments follow the specified Inverse Gaussian distribution:
where are the sorted probability integral transformed residuals .
The Likelihood Ratio Test statistic compares nested models (e.g., Classical IGP vs IGP-Gamma):
ad_test_ig returns an object of class "ad_test_ig" containing:
statistic |
The computed Anderson-Darling statistic |
p_value |
Asymptotic p-value for the test. |
n |
Sample size. |
lr_test returns an object of class "lr_test" containing:
statistic |
The LRT test statistic. |
df |
Degrees of freedom difference. |
p_value |
P-value based on the chi-squared distribution. |
model0_loglik, model1_loglik
|
Log-likelihoods of both models. |
Anderson, T. W., & Darling, D. A. (1954). A test of goodness of fit. Journal of the American Statistical Association, 49(268), 765-769. doi:10.1080/01621459.1954.10501232.
data(laser) fit_none <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "none") fit_gamma <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma") # LRT comparing IGP vs IGP-Gamma lr_test(fit_none, fit_gamma)data(laser) fit_none <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "none") fit_gamma <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma") # LRT comparing IGP vs IGP-Gamma lr_test(fit_none, fit_gamma)
Experimental fatigue crack length measurements on 21 alloy specimens subjected to cyclic stress testing up to 0.12 million cycles (120 thousand cycles).
crackcrack
A data frame with 262 rows and 6 variables:
Integer specimen identifier (1 to 21).
Inspection time in millions of cycles (0.00 to 0.12).
Inspection time in cycles (0 to 120,000).
Inspection time in thousands of cycles (0 to 120).
Crack length measurement in inches (initial crack 0.90 inches, failure at 1.60 inches).
Transformed cumulative degradation , with failure threshold .
Lu, C. J., & Meeker, W. Q. (1993). Using degradation measures to estimate a time-to-failure distribution. Technometrics, 35(2), 161-174. doi:10.1080/00401706.1993.10485038.
Morita, L. H. M., Tomazella, V. L. D., Balakrishnan, N., Ramos, P. L., Ferreira, P. H., & Louzada, F. (2021). Inverse Gaussian process model with frailty term in reliability analysis. Quality and Reliability Engineering International, 37(2), 763-784. doi:10.1002/qre.2762.
data(crack) head(crack)data(crack) head(crack)
Density, distribution function, quantile function, and random generation
for the Inverse Gaussian (Wald) distribution with mean mu and shape/scale
parameter lambda.
d_ig(x, mu = 1, lambda = 1, log = FALSE) p_ig(q, mu = 1, lambda = 1, lower.tail = TRUE, log.p = FALSE) q_ig(p, mu = 1, lambda = 1, lower.tail = TRUE, log.p = FALSE) r_ig(n, mu = 1, lambda = 1)d_ig(x, mu = 1, lambda = 1, log = FALSE) p_ig(q, mu = 1, lambda = 1, lower.tail = TRUE, log.p = FALSE) q_ig(p, mu = 1, lambda = 1, lower.tail = TRUE, log.p = FALSE) r_ig(n, mu = 1, lambda = 1)
x, q
|
Numeric vector of quantiles. Must be positive. |
mu |
Mean parameter. Must be strictly positive. Default is |
lambda |
Shape parameter. Must be strictly positive. Default is |
log, log.p
|
Logical; if |
lower.tail |
Logical; if |
p |
Numeric vector of probabilities (between 0 and 1). |
n |
Number of observations to generate. Must be a single positive integer. |
The probability density function of the Inverse Gaussian distribution is:
The cumulative distribution function is evaluated using:
where is the standard normal cumulative distribution function.
d_ig returns the density, p_ig returns the distribution function,
q_ig returns the quantile function, and r_ig returns a vector of
random variates of length n.
Wasan, M. T. (1968). On an inverse Gaussian process. Scandinavian Actuarial Journal, 1968(1-2), 69-96.
# Density and CDF d_ig(1.5, mu = 2, lambda = 5) p_ig(1.5, mu = 2, lambda = 5) # Quantiles and random generation q_ig(0.5, mu = 2, lambda = 5) set.seed(123) r_ig(5, mu = 2, lambda = 5)# Density and CDF d_ig(1.5, mu = 2, lambda = 5) p_ig(1.5, mu = 2, lambda = 5) # Quantiles and random generation q_ig(0.5, mu = 2, lambda = 5) set.seed(123) r_ig(5, mu = 2, lambda = 5)
Fits an Inverse Gaussian Process (IGP) degradation model to longitudinal or repeated-measures degradation data, with optional gamma or inverse Gaussian frailty to account for unobserved unit-to-unit heterogeneity.
igp_fit( data, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = c("none", "gamma", "ig"), mean_fun = "linear", start = NULL, method = "BFGS", control = list() )igp_fit( data, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = c("none", "gamma", "ig"), mean_fun = "linear", start = NULL, method = "BFGS", control = list() )
data |
A data frame containing degradation measurements across units over time. |
time_col |
Character string specifying the name of the column in |
deg_col |
Character string specifying the name of the column in |
unit_col |
Character string specifying the name of the column in |
frailty |
Character string specifying the frailty distribution. Options are |
mean_fun |
Character string or custom function specifying the mean degradation function |
start |
Optional numeric vector of initial parameter values. If |
method |
Character string specifying the optimization method to pass to |
control |
Optional list of control parameters forwarded to |
In reliability analysis, degradation paths of high-reliability components are often monitored over time.
The classical Inverse Gaussian Process (IGP) models the degradation increments
as independent Inverse Gaussian random variables:
where is a monotone increasing mean function and is the precision/scale parameter.
When experimental units exhibit unobserved heterogeneity, a multiplicative frailty variable modifies
the conditional hazard of unit :
Under the **IGP-Gamma** model, with mean 1 and variance .
Under the **IGP-IG** model, with mean 1 and variance .
Parameters are estimated via Maximum Likelihood Estimation (MLE) in unconstrained log-parameter space
(), guaranteeing strictly positive estimates.
Standard errors and covariance matrices are derived using the Delta method and numerical inversion of the Hessian matrix.
An object of class "igp_fit" containing:
coefficients |
Named numeric vector of estimated parameters (e.g., |
std_errors |
Named numeric vector of asymptotic standard errors. |
vcov |
Variance-covariance matrix of parameter estimates. |
loglik |
Maximised log-likelihood value. |
aic |
Akaike Information Criterion (AIC). |
bic |
Bayesian Information Criterion (BIC). |
frailty |
The frailty distribution used ( |
mean_fun_name |
Name/type of mean function. |
mean_fun |
The mean function evaluated. |
n_units |
Number of unique experimental units. |
n_obs |
Total number of degradation increment observations. |
convergence |
Convergence code returned by |
unit_data |
List of per-unit sorted increments and inspection times. |
data |
Original data frame supplied. |
call |
The matched call. |
Morita, L. H. M., Tomazella, V. L. D., Balakrishnan, N., Ramos, P. L., Ferreira, P. H., & Louzada, F. (2021). Inverse Gaussian process model with frailty term in reliability analysis. Quality and Reliability Engineering International, 37(2), 763-784. doi:10.1002/qre.2762.
Meeker, W. Q., & Escobar, L. A. (1998). Statistical Methods for Reliability Data. John Wiley & Sons.
individual_frailty, lifetime_dist, lr_test, sim_igp
# Fit Classical IGP, IGP-Gamma, and IGP-IG to laser degradation data data(laser) fit_none <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "none") fit_gamma <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma") fit_ig <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "ig") # Summary comparison summary(fit_none) summary(fit_gamma) summary(fit_ig)# Fit Classical IGP, IGP-Gamma, and IGP-IG to laser degradation data data(laser) fit_none <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "none") fit_gamma <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma") fit_ig <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "ig") # Summary comparison summary(fit_none) summary(fit_gamma) summary(fit_ig)
Computes empirical Bayes / posterior individual frailty estimates
and posterior variances for each experimental unit.
individual_frailty(object, conf_level = 0.95)individual_frailty(object, conf_level = 0.95)
object |
An object of class |
conf_level |
Nominal confidence level for posterior frailty intervals. Default is |
Under the **IGP-Gamma** model, the posterior distribution of the frailty variable given the degradation path is:
which corresponds to a Generalized Inverse Gaussian (GIG) distribution.
Under the **IGP-IG** model, the posterior distribution is:
also belonging to the GIG family.
Posterior moments are evaluated analytically using modified Bessel functions of the second kind .
Units with higher exhibit higher degradation rates and greater failure proneness.
An object of class "individual_frailty" containing:
estimates |
Data frame with columns: |
frailty_type |
Type of frailty distribution. |
most_fragile |
Subset of top fragile units. |
least_fragile |
Subset of least fragile units. |
conf_level |
Nominal confidence level. |
Morita, L. H. M., Tomazella, V. L. D., Balakrishnan, N., Ramos, P. L., Ferreira, P. H., & Louzada, F. (2021). Inverse Gaussian process model with frailty term in reliability analysis. Quality and Reliability Engineering International, 37(2), 763-784. doi:10.1002/qre.2762.
data(laser) fit_gam <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma") frail_est <- individual_frailty(fit_gam) print(frail_est)data(laser) fit_gam <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma") frail_est <- individual_frailty(fit_gam) print(frail_est)
Repeated-measures degradation data on 15 Gallium Arsenide (GaAs) laser devices tested at 80 degrees Celsius over 4,000 hours of operation with 16 equidistant inspection intervals.
laserlaser
A data frame with 255 rows and 5 variables:
Integer unit identifier (1 to 15).
Original unit ID code (101 to 115).
Inspection time in hours (0, 250, 500, ..., 4000).
Inspection time in thousands of hours (0.0 to 4.0).
Percentage increase in operating current (%), with failure defined at 10%.
Meeker, W. Q., & Escobar, L. A. (1998). Statistical Methods for Reliability Data. John Wiley & Sons.
Morita, L. H. M., Tomazella, V. L. D., Balakrishnan, N., Ramos, P. L., Ferreira, P. H., & Louzada, F. (2021). Inverse Gaussian process model with frailty term in reliability analysis. Quality and Reliability Engineering International, 37(2), 763-784. doi:10.1002/qre.2762.
data(laser) head(laser)data(laser) head(laser)
Computes the implied lifetime cumulative distribution function (CDF),
probability density function (PDF), survival function, and quantiles with
asymptotic confidence intervals for a predefined failure threshold .
lifetime_dist( object, threshold, times = NULL, probs = c(0.01, 0.05, 0.1, 0.5, 0.8), conf_level = 0.95 )lifetime_dist( object, threshold, times = NULL, probs = c(0.01, 0.05, 0.1, 0.5, 0.8), conf_level = 0.95 )
object |
An object of class |
threshold |
Numeric failure threshold |
times |
Optional numeric vector of evaluation time points. If |
probs |
Numeric vector of quantile probabilities. Default is |
conf_level |
Nominal confidence level for quantile asymptotic confidence intervals. Default is |
In threshold degradation models, the soft failure time is defined as:
The lifetime CDF is the probability that cumulative degradation exceeds :
For the **classical IGP** model:
For the **IGP-Gamma** model:
For the **IGP-IG** model:
where .
Quantiles are computed by numerical root finding on .
Asymptotic standard errors for are obtained via the Delta method using
the estimated variance-covariance matrix of parameter estimates.
An object of class "lifetime_dist" containing:
threshold |
The specified failure threshold |
quantiles |
Data frame containing estimated quantiles |
curve |
Data frame with evaluation grid: |
conf_level |
Nominal confidence level. |
Morita, L. H. M., Tomazella, V. L. D., Balakrishnan, N., Ramos, P. L., Ferreira, P. H., & Louzada, F. (2021). Inverse Gaussian process model with frailty term in reliability analysis. Quality and Reliability Engineering International, 37(2), 763-784. doi:10.1002/qre.2762.
data(laser) fit_gam <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma") lt <- lifetime_dist(fit_gam, threshold = 10, probs = c(0.01, 0.05, 0.1, 0.5, 0.8)) print(lt)data(laser) fit_gam <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma") lt <- lifetime_dist(fit_gam, threshold = 10, probs = c(0.01, 0.05, 0.1, 0.5, 0.8)) print(lt)
Standard S3 methods for objects of class "igp_fit": print,
summary, coef, vcov, logLik, AIC,
BIC, confint, predict, and plot.
## S3 method for class 'igp_fit' print(x, digits = 4, ...) ## S3 method for class 'igp_fit' summary(object, conf_level = 0.95, ...) ## S3 method for class 'summary_igp_fit' print(x, digits = 4, ...) ## S3 method for class 'igp_fit' coef(object, ...) ## S3 method for class 'igp_fit' vcov(object, ...) ## S3 method for class 'igp_fit' logLik(object, ...) ## S3 method for class 'igp_fit' AIC(object, ..., k = 2) ## S3 method for class 'igp_fit' BIC(object, ...) ## S3 method for class 'igp_fit' confint(object, parm, level = 0.95, ...) ## S3 method for class 'igp_fit' predict( object, newdata = NULL, threshold = NULL, times = NULL, probs = c(0.01, 0.05, 0.1, 0.5, 0.8), type = c("lifetime", "frailty", "quantiles"), ... ) ## S3 method for class 'igp_fit' plot( x, type = c("paths", "frailty", "lifetime", "diagnostics", "all"), threshold = NULL, ... )## S3 method for class 'igp_fit' print(x, digits = 4, ...) ## S3 method for class 'igp_fit' summary(object, conf_level = 0.95, ...) ## S3 method for class 'summary_igp_fit' print(x, digits = 4, ...) ## S3 method for class 'igp_fit' coef(object, ...) ## S3 method for class 'igp_fit' vcov(object, ...) ## S3 method for class 'igp_fit' logLik(object, ...) ## S3 method for class 'igp_fit' AIC(object, ..., k = 2) ## S3 method for class 'igp_fit' BIC(object, ...) ## S3 method for class 'igp_fit' confint(object, parm, level = 0.95, ...) ## S3 method for class 'igp_fit' predict( object, newdata = NULL, threshold = NULL, times = NULL, probs = c(0.01, 0.05, 0.1, 0.5, 0.8), type = c("lifetime", "frailty", "quantiles"), ... ) ## S3 method for class 'igp_fit' plot( x, type = c("paths", "frailty", "lifetime", "diagnostics", "all"), threshold = NULL, ... )
x, object
|
An object of class |
digits |
Integer indicating the number of decimal places to format. Default is |
... |
Further arguments passed to or from other methods. |
conf_level, level
|
Nominal confidence level (e.g. 0.95 for 95% confidence intervals). Default is |
k |
Optional numeric penalty per parameter for |
parm |
Optional vector of numbers or parameter names to compute confidence intervals for. |
newdata |
Optional new data frame for prediction. |
threshold |
Failure threshold |
times |
Numeric vector of inspection times for lifetime predictions. |
probs |
Numeric vector of quantile probabilities. Default is |
type |
For |
print.igp_fit: Prints model summary and returns x invisibly.
summary.igp_fit: Returns an object of class "summary_igp_fit".
coef.igp_fit: Returns named vector of estimated parameters.
vcov.igp_fit: Returns the variance-covariance matrix.
logLik.igp_fit: Returns log-likelihood with degrees of freedom and observations.
AIC.igp_fit, BIC.igp_fit: Return model selection criterion values.
confint.igp_fit: Returns confidence interval matrix.
predict.igp_fit: Returns predicted lifetime distribution, quantiles, or frailties.
plot.igp_fit: Generates base graphics diagnostic and predictive plots.
igp_fit, individual_frailty, lifetime_dist
data(laser) fit <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma") print(fit) summary(fit) coef(fit) vcov(fit) logLik(fit) AIC(fit) BIC(fit) confint(fit)data(laser) fit <- igp_fit(laser, time_col = "t", deg_col = "increase", unit_col = "unit", frailty = "gamma") print(fit) summary(fit) coef(fit) vcov(fit) logLik(fit) AIC(fit) BIC(fit) confint(fit)
Simulates longitudinal degradation measurements for multiple units under classical IGP, IGP-Gamma frailty, or IGP-IG frailty models.
sim_igp( n = 10, times = seq(0, 4, by = 0.25), theta = 2, eta = 15, xi = 0.2, frailty = c("none", "gamma", "ig"), mean_fun = "linear", seed = NULL )sim_igp( n = 10, times = seq(0, 4, by = 0.25), theta = 2, eta = 15, xi = 0.2, frailty = c("none", "gamma", "ig"), mean_fun = "linear", seed = NULL )
n |
Integer specifying the number of experimental units to simulate. |
times |
Numeric vector of inspection times (e.g. |
theta |
Mean parameter |
eta |
Precision/scale parameter |
xi |
Frailty variance parameter |
frailty |
Frailty specification: |
mean_fun |
Mean degradation function |
seed |
Optional integer random seed for reproducibility. |
A data frame containing simulated degradation paths:
Integer unit identifier (1 to n).
Inspection time.
Simulated degradation increment .
Simulated cumulative degradation .
Realized individual frailty multiplier for unit .
Morita, L. H. M., Tomazella, V. L. D., Balakrishnan, N., Ramos, P. L., Ferreira, P. H., & Louzada, F. (2021). Inverse Gaussian process model with frailty term in reliability analysis. Quality and Reliability Engineering International, 37(2), 763-784. doi:10.1002/qre.2762.
set.seed(42) sim_data <- sim_igp(n = 5, times = seq(0, 2, by = 0.5), theta = 1.5, eta = 10, xi = 0.3, frailty = "gamma") head(sim_data)set.seed(42) sim_data <- sim_igp(n = 5, times = seq(0, 2, by = 0.5), theta = 1.5, eta = 10, xi = 0.3, frailty = "gamma") head(sim_data)