| Title: | Generalized Stress-Strength Reliability Estimation Under Censoring Schemes |
|---|---|
| Description: | Generalized framework for data generation, Maximum Likelihood Estimation, and Bayesian estimation of stress-strength reliability R = P(Y < X) for arbitrary continuous distributions under censoring schemes based on Chapter 9 of 'Balakrishnan', 'Cramer', and 'Kundu' (2023) <ISBN:978-0-12-398387-9>. Users provide probability density functions, cumulative distribution functions, survival functions, support bounds, parameter ranges, and sample sizes. Implements data generation under Type-I, Type-II, progressive Type-II, Type-I hybrid, Type-II hybrid, generalized hybrid, progressive hybrid, joint, block random, middle, and truncation censoring schemes, accompanied by diagnostic histograms, dot plots, and autocorrelation plots. Maximum Likelihood Estimation supports optimization routines including 'Newton-Raphson', 'Broyden'-'Fletcher'-'Goldfarb'-'Shanno' ('BFGS'), 'BFGS' in R ('BFGSR'), 'Berndt'-'Hall'-'Hall'-'Hausman' ('BHHH'), Simulated Annealing ('SANN'), Conjugate Gradients ('CG'), and 'Nelder'-'Mead' ('NM'), returning summaries ('AIC', 'coef', 'logLik', 'nIter', 'stdEr', summary, 'vcov'). Bayesian estimation of stress-strength reliability R = P(Y < X) is performed via Gibbs sampling, Metropolis-Hastings algorithm, Importance Sampling, and 'Lindley' approximation (1980). Methods and censoring schemes are described in 'Balakrishnan', 'Cramer', and 'Kundu' (2023, ISBN:978-0-12-398387-9), 'Lindley' (1980) <doi:10.1111/j.2517-6161.1980.tb01102.x>, 'Geweke' (1989) <doi:10.2307/2290062>, 'Metropolis' (1953) <doi:10.1063/1.1699114>, 'Hastings' (1970) <doi:10.1093/biomet/57.1.97>, 'Geman' and 'Geman' (1984) <doi:10.1109/TPAMI.1984.4767596>, 'Kundu' and 'Gupta' (2005) <doi:10.1016/j.jspi.2004.09.006>, 'Kundu' and 'Gupta' (2006) <doi:10.1016/j.csda.2005.02.007>, 'Berndt', 'Hall', 'Hall', and 'Hausman' (1974) <doi:10.3386/t0003>, 'Fletcher' (1987, ISBN:978-0-471-91547-8), and 'Nelder' and 'Mead' (1965) <doi:10.1093/comjnl/7.4.308>. |
| Authors: | Shikhar Tyagi [aut, cre] (ORCID: <https://orcid.org/0000-0003-1606-0844>), Arvind Pandey [aut], Bhupendra Singh [aut], Vrijesh Tripathi [aut] |
| Maintainer: | Shikhar Tyagi <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-09-18 10:59:05 UTC |
| Source: | https://github.com/cran/StressCensoR |
Fits Bayesian stress-strength reliability R = P(Y < X) using Gibbs sampling, Metropolis-Hastings, Importance Sampling, or Lindley Approximation.
bayes_stress_strength( data_x, data_y, pdf_x, cdf_y, method = "gibbs", start_x = 1, start_y = 1, ... )bayes_stress_strength( data_x, data_y, pdf_x, cdf_y, method = "gibbs", start_x = 1, start_y = 1, ... )
data_x |
Stress data vector X. |
data_y |
Strength data vector Y. |
pdf_x |
PDF function for X. |
cdf_y |
CDF function for Y. |
method |
Bayesian estimation method: "gibbs", "mh", "is", or "lindley". |
start_x |
Initial parameter guess for X. |
start_y |
Initial parameter guess for Y. |
... |
Additional control arguments passed to specific algorithms. |
List of Bayesian estimation results.
S3 Methods for mle_censored Objects
## S3 method for class 'mle_censored' coef(object, ...) ## S3 method for class 'mle_censored' vcov(object, ...) ## S3 method for class 'mle_censored' logLik(object, ...) ## S3 method for class 'mle_censored' AIC(object, ..., k = 2) ## S3 method for class 'mle_censored' stdEr(object, ...) ## S3 method for class 'mle_censored' nIter(object, ...) ## S3 method for class 'mle_censored' summary(object, ...) ## S3 method for class 'mle_censored' print(x, ...) ## S3 method for class 'summary.mle_censored' print(x, ...)## S3 method for class 'mle_censored' coef(object, ...) ## S3 method for class 'mle_censored' vcov(object, ...) ## S3 method for class 'mle_censored' logLik(object, ...) ## S3 method for class 'mle_censored' AIC(object, ..., k = 2) ## S3 method for class 'mle_censored' stdEr(object, ...) ## S3 method for class 'mle_censored' nIter(object, ...) ## S3 method for class 'mle_censored' summary(object, ...) ## S3 method for class 'mle_censored' print(x, ...) ## S3 method for class 'summary.mle_censored' print(x, ...)
object |
An object of class |
... |
Additional arguments. |
k |
Penalty per parameter for AIC calculation (default is 2). |
x |
An object of class |
Extracted method values (coefficients, vcov matrix, logLik, AIC, stdEr, nIter, summary, or printed output).
Computes R = P(Y < X) given PDF/CDF functions and parameter vectors.
compute_stress_strength_R( pdf_x, cdf_y, param_x, param_y, lower = 0, upper = Inf )compute_stress_strength_R( pdf_x, cdf_y, param_x, param_y, lower = 0, upper = Inf )
pdf_x |
PDF function for X (stress), takes (x, param_x). |
cdf_y |
CDF function for Y (strength), takes (y, param_y). |
param_x |
Parameter vector for X. |
param_y |
Parameter vector for Y. |
lower |
Lower support bound. |
upper |
Upper support bound. |
Numeric scalar value of R in [0, 1].
Solves Example 11.3 from Chapter 9 of Balakrishnan, Cramer, and Kundu (2023) using Type-I and Type-II Hybrid Censoring schemes (Birnbaum & Saunders 1958 dataset).
example_aluminum_coupons()example_aluminum_coupons()
A list containing dataset, hybrid censoring limits, MLEs, and Bayesian estimates.
res <- example_aluminum_coupons() print(res$mle_hybrid1) print(res$mle_hybrid2)res <- example_aluminum_coupons() print(res$mle_hybrid1) print(res$mle_hybrid2)
Solves Example 11.2 from Chapter 9 of Balakrishnan, Cramer, and Kundu (2023) using progressive Type-II censoring estimation (MLE and Bayesian methods).
example_insulating_fluid()example_insulating_fluid()
A list containing dataset, MLE estimates, and Bayesian stress-strength reliability estimates.
res <- example_insulating_fluid() print(res$mle_fit) print(res$bayes_fit)res <- example_insulating_fluid() print(res$mle_fit) print(res$bayes_fit)
Solves Stress-Strength Reliability R = P(Y < X) for stress X and strength Y under Chapter 9 hybrid censoring schemes using MLE and Bayesian methods.
example_stress_strength()example_stress_strength()
A list containing stress/strength datasets, MLE, Gibbs, M-H, IS, and Lindley estimates.
res <- example_stress_strength() print(res$R_mle) print(res$R_lindley)res <- example_stress_strength() print(res$R_mle) print(res$R_lindley)
Bayesian Stress-Strength Reliability Estimation via Gibbs Sampling
gibbs_stress_strength( data_x, data_y, pdf_x, cdf_y, prior_x = NULL, prior_y = NULL, start_x = 1, start_y = 1, iter = 5000, burnin = 1000 )gibbs_stress_strength( data_x, data_y, pdf_x, cdf_y, prior_x = NULL, prior_y = NULL, start_x = 1, start_y = 1, iter = 5000, burnin = 1000 )
data_x |
Stress data vector X. |
data_y |
Strength data vector Y. |
pdf_x |
PDF function for X. |
cdf_y |
CDF function for Y. |
prior_x |
Prior density for parameter of X. |
prior_y |
Prior density for parameter of Y. |
start_x |
Initial parameter guess for X. |
start_y |
Initial parameter guess for Y. |
iter |
Number of MCMC iterations. |
burnin |
Number of burn-in iterations. |
A list containing posterior samples of parameters and R, and point estimates.
Bayesian Stress-Strength Reliability Estimation via Importance Sampling
is_stress_strength( data_x, data_y, pdf_x, cdf_y, proposal_sampler = NULL, proposal_density = NULL, n_samples = 2000 )is_stress_strength( data_x, data_y, pdf_x, cdf_y, proposal_sampler = NULL, proposal_density = NULL, n_samples = 2000 )
data_x |
Stress data vector X. |
data_y |
Strength data vector Y. |
pdf_x |
PDF function for X. |
cdf_y |
CDF function for Y. |
proposal_sampler |
Function generating proposal parameter draws. |
proposal_density |
Function computing proposal log-density. |
n_samples |
Number of importance samples. |
A list containing importance weights, R estimate, and standard error.
Bayesian Stress-Strength Reliability Estimation via Lindley's Approximation (1980)
lindley_stress_strength(data_x, data_y, pdf_x, cdf_y, start_x = 1, start_y = 1)lindley_stress_strength(data_x, data_y, pdf_x, cdf_y, start_x = 1, start_y = 1)
data_x |
Stress data vector X. |
data_y |
Strength data vector Y. |
pdf_x |
PDF function for X. |
cdf_y |
CDF function for Y. |
start_x |
Initial parameter guess for X. |
start_y |
Initial parameter guess for Y. |
A list containing Lindley approximation estimate of R.
Bayesian Stress-Strength Reliability Estimation via Metropolis-Hastings Algorithm
mh_stress_strength( data_x, data_y, pdf_x, cdf_y, prior_x = NULL, prior_y = NULL, start_x = 1, start_y = 1, iter = 5000, burnin = 1000 )mh_stress_strength( data_x, data_y, pdf_x, cdf_y, prior_x = NULL, prior_y = NULL, start_x = 1, start_y = 1, iter = 5000, burnin = 1000 )
data_x |
Stress data vector X. |
data_y |
Strength data vector Y. |
pdf_x |
PDF function for X. |
cdf_y |
CDF function for Y. |
prior_x |
Prior density for parameter of X. |
prior_y |
Prior density for parameter of Y. |
start_x |
Initial parameter guess for X. |
start_y |
Initial parameter guess for Y. |
iter |
Number of MCMC iterations. |
burnin |
Number of burn-in iterations. |
A list containing posterior samples of parameters and R, and point estimates.
Fits parameter estimates and calculates stress-strength reliability R = P(Y < X) under user-specified censoring schemes and optimization algorithms.
mle_censored( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, scheme = "Type-I", method = "NR", data_y = NULL, pdf_y = NULL, cdf_y = NULL, start_y = NULL, ... )mle_censored( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, scheme = "Type-I", method = "NR", data_y = NULL, pdf_y = NULL, cdf_y = NULL, start_y = NULL, ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
scheme |
Censoring scheme name. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
data_y |
Optional observed strength data Y. |
pdf_y |
Optional PDF function for Y. |
cdf_y |
Optional CDF function for Y. |
start_y |
Optional initial parameter vector for Y. |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Generalized Hybrid Censoring
mle_genhybrid( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_genhybrid( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Type-I Hybrid Censoring
mle_hybrid1( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_hybrid1( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Type-II Hybrid Censoring
mle_hybrid2( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_hybrid2( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Interval Censoring
mle_interval( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_interval( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Joint Censoring
mle_joint( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_joint( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Middle Censoring
mle_middle( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_middle( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Progressive Type-II Censoring
mle_prog2( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_prog2( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Progressive Hybrid Censoring
mle_proghybrid( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_proghybrid( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Random Censoring
mle_random( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_random( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Truncated Distribution
mle_trunc( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_trunc( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Type-I Censoring
mle_type1( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_type1( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
MLE Under Type-II Censoring
mle_type2( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )mle_type2( data, pdf = NULL, cdf = NULL, surv = NULL, start = NULL, method = "NR", ... )
data |
Observed data vector or data frame. |
pdf |
PDF function f(x, param). |
cdf |
CDF function F(x, param). |
surv |
Survival function S(x, param). |
start |
Initial parameter vector. |
method |
Maximisation method: "NR", "BFGS", "BFGSR", "BHHH", "SANN", "CG", or "NM". |
... |
Further control parameters passed to optimization. |
An object of class mle_censored.
Number of Iterations Generic Function
nIter(object, ...)nIter(object, ...)
object |
Model fit object. |
... |
Additional arguments. |
Number of optimization iterations.
Produces diagnostic plots including Histogram with PDF overlay, Dot Plot, and Autocorrelation (ACF) plot for generated samples.
## S3 method for class 'rcensored' plot(x, ...)## S3 method for class 'rcensored' plot(x, ...)
x |
An object of class |
... |
Additional graphical parameters. |
Invisibly returns x.
Data Generation Under Generalized Hybrid Censoring
rcensor_genhybrid( n, k, r, T0, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )rcensor_genhybrid( n, k, r, T0, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )
n |
Total sample size. |
k |
Minimum failure count. |
r |
Maximum failure count. |
T0 |
Time threshold. |
cdf |
CDF function. |
pdf |
PDF function. |
surv |
Survival function. |
param |
Parameter vector. |
lower |
Lower support limit. |
upper |
Upper support limit. |
seed |
Optional random seed for reproducibility. |
An object of class rcensored.
Data Generation Under Type-I Hybrid Censoring
rcensor_hybrid1( n, r, T0, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )rcensor_hybrid1( n, r, T0, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )
n |
Total sample size. |
r |
Failure count threshold. |
T0 |
Time threshold. |
cdf |
CDF function. |
pdf |
PDF function. |
surv |
Survival function. |
param |
Parameter vector. |
lower |
Lower support limit. |
upper |
Upper support limit. |
seed |
Optional random seed for reproducibility. |
An object of class rcensored.
Data Generation Under Type-II Hybrid Censoring
rcensor_hybrid2( n, r, T0, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )rcensor_hybrid2( n, r, T0, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )
n |
Total sample size. |
r |
Failure count threshold. |
T0 |
Time threshold. |
cdf |
CDF function. |
pdf |
PDF function. |
surv |
Survival function. |
param |
Parameter vector. |
lower |
Lower support limit. |
upper |
Upper support limit. |
seed |
Optional random seed for reproducibility. |
An object of class rcensored.
Data Generation Under Interval Censoring
rcensor_interval(n, cdf = NULL, pdf = NULL, param = NULL, seed = NULL)rcensor_interval(n, cdf = NULL, pdf = NULL, param = NULL, seed = NULL)
n |
Sample size. |
cdf |
CDF function. |
pdf |
PDF function. |
param |
Parameter vector. |
seed |
Optional random seed. |
An object of class rcensored.
Data Generation Under Joint Censoring Scheme
rcensor_joint( n1, n2, r, cdf_x = NULL, cdf_y = NULL, param_x = NULL, param_y = NULL, seed = NULL )rcensor_joint( n1, n2, r, cdf_x = NULL, cdf_y = NULL, param_x = NULL, param_y = NULL, seed = NULL )
n1 |
Sample size of group X. |
n2 |
Sample size of group Y. |
r |
Total combined failure count. |
cdf_x |
CDF function for X. |
cdf_y |
CDF function for Y. |
param_x |
Parameter vector for X. |
param_y |
Parameter vector for Y. |
seed |
Optional random seed. |
An object of class rcensored.
Data Generation Under Middle Censoring
rcensor_middle(n, cdf = NULL, pdf = NULL, param = NULL, seed = NULL)rcensor_middle(n, cdf = NULL, pdf = NULL, param = NULL, seed = NULL)
n |
Sample size. |
cdf |
CDF function. |
pdf |
PDF function. |
param |
Parameter vector. |
seed |
Optional random seed. |
An object of class rcensored.
Data Generation Under Progressive Type-II Censoring
rcensor_prog2( n, r, R, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )rcensor_prog2( n, r, R, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )
n |
Total sample size. |
r |
Number of failures. |
R |
Removal scheme vector of length r. |
cdf |
CDF function. |
pdf |
PDF function. |
surv |
Survival function. |
param |
Parameter vector. |
lower |
Lower support limit. |
upper |
Upper support limit. |
seed |
Optional random seed for reproducibility. |
An object of class rcensored.
Data Generation Under Progressive Hybrid Censoring
rcensor_proghybrid( n, r, R, T0, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )rcensor_proghybrid( n, r, R, T0, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )
n |
Total sample size. |
r |
Failure count threshold. |
R |
Removal scheme vector. |
T0 |
Time threshold. |
cdf |
CDF function. |
pdf |
PDF function. |
surv |
Survival function. |
param |
Parameter vector. |
lower |
Lower support limit. |
upper |
Upper support limit. |
seed |
Optional random seed for reproducibility. |
An object of class rcensored.
Data Generation Under Random Censoring
rcensor_random( n, cdf = NULL, pdf = NULL, param = NULL, cen_cdf = NULL, cen_param = NULL, seed = NULL )rcensor_random( n, cdf = NULL, pdf = NULL, param = NULL, cen_cdf = NULL, cen_param = NULL, seed = NULL )
n |
Sample size. |
cdf |
CDF function. |
pdf |
PDF function. |
param |
Parameter vector. |
cen_cdf |
Censoring distribution CDF function. |
cen_param |
Censoring distribution parameters. |
seed |
Optional random seed. |
An object of class rcensored.
Data Generation Under Truncated Distribution
rcensor_trunc( n, cdf = NULL, pdf = NULL, param = NULL, left_trunc = -Inf, right_trunc = Inf, seed = NULL )rcensor_trunc( n, cdf = NULL, pdf = NULL, param = NULL, left_trunc = -Inf, right_trunc = Inf, seed = NULL )
n |
Sample size. |
cdf |
CDF function. |
pdf |
PDF function. |
param |
Parameter vector. |
left_trunc |
Left truncation point. |
right_trunc |
Right truncation point. |
seed |
Optional random seed. |
An object of class rcensored.
Data Generation Under Type-I Censoring
rcensor_type1( n, T0, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )rcensor_type1( n, T0, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )
n |
Sample size. |
T0 |
Censoring time point. |
cdf |
CDF function. |
pdf |
PDF function. |
surv |
Survival function. |
param |
Parameter vector. |
lower |
Lower support limit. |
upper |
Upper support limit. |
seed |
Optional random seed for reproducibility. |
An object of class rcensored.
Data Generation Under Type-II Censoring
rcensor_type2( n, r, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )rcensor_type2( n, r, cdf = NULL, pdf = NULL, surv = NULL, param = NULL, lower = 0, upper = Inf, seed = NULL )
n |
Total sample size. |
r |
Number of failures to observe. |
cdf |
CDF function. |
pdf |
PDF function. |
surv |
Survival function. |
param |
Parameter vector. |
lower |
Lower support limit. |
upper |
Upper support limit. |
seed |
Optional random seed for reproducibility. |
An object of class rcensored.
Standard Error Generic Function
stdEr(object, ...)stdEr(object, ...)
object |
Model fit object. |
... |
Additional arguments. |
Vector of standard errors.