Title: | Bias Correction under Censoring Plan |
---|---|
Description: | Developed for the following tasks. Simulating, computing maximum likelihood estimator, computing the Fisher information matrix, computing goodness-of-fit measures, and correcting bias of the ML estimator for a wide range of distributions fitted to units placed on progressive type-I interval censoring and progressive type-II censoring plans. The methods of Cox and Snell (1968) <doi:10.1111/j.2517-6161.1968.tb00724.x> and bootstrap method for computing the bias-corrected maximum likelihood estimator. |
Authors: | Mahdi Teimouri |
Maintainer: | Mahdi Teimouri <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.5.0 |
Built: | 2024-11-22 03:20:00 UTC |
Source: | https://github.com/cran/bccp |
Computes the bias corrected maximum likelihood estimator (MLE) under progressive type-I interval censoring scheme using the Bootstrap resampling. It works by obtaining the empirical distribution of the MLE using bootstrap approach and then constructing the percentile confidence intervals (PCI) suggested by DiCiccio and Tibshirani (1987).
bootbctype1(plan, param, mle, cdf, lb = 0, ub = Inf, nboot = 200, coverage = 0.95)
bootbctype1(plan, param, mle, cdf, lb = 0, ub = Inf, nboot = 200, coverage = 0.95)
plan |
Censoring plan for progressive type-I interval censoring scheme. It must be given as a |
param |
Vector of the of the family parameter's names. |
mle |
Vector of the maximum likelihood estimators. |
cdf |
Expression of the cumulative distribution function. |
lb |
Lower bound of the family support. That is zero by default. |
ub |
Upper bound of the family's support. That is |
nboot |
Number of Bootstrap resampling. |
coverage |
Confidence or coverage level for constructing percentile confidence intervals. That is 0.95 by default. |
A list of two parts including: 1- bias of MLE with respect to mean, bias of MLE with respect to median, lower bound of the percentile confidence interval (LPCI), and upper bound of the percentile confidence interval (UPCI) at the given coverage level and 2- covariance matrix of the MLE obtained using bootstraping.
Mahdi Teimouri
T. J. DiCiccio and R. Tibshirani 1987. Bootstrap confidence intervals and bootstrap approximations. Journal of the American Statistical Association, 82, 163-170.
A. J. Lemonte, F. Cribari-Neto, and K. L. P. Vasconcellos 2007. Improved statistical inference for the two-parameter Birnbaum-Saunders distribution. Computational Statistics and Data Analysis, 51, 4656-4681.
data(plasma) n <- 112 param <- c("lambda","beta") mle <- c(1.5, 0.05) cdf <- quote( (1-exp( -(x*beta)))^lambda ) pdf <- quote( lambda*(1-exp( -(x*beta)))^(lambda-1)*beta*exp( -(x*beta)) ) lb <- 0 plan <- rtype1(n = n, P = plasma$P, T = plasma$upper, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb) ub <- Inf nboot <- 200 coverage <- 0.95 bootbctype1(plan = plan, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub, nboot = nboot, coverage = coverage)
data(plasma) n <- 112 param <- c("lambda","beta") mle <- c(1.5, 0.05) cdf <- quote( (1-exp( -(x*beta)))^lambda ) pdf <- quote( lambda*(1-exp( -(x*beta)))^(lambda-1)*beta*exp( -(x*beta)) ) lb <- 0 plan <- rtype1(n = n, P = plasma$P, T = plasma$upper, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb) ub <- Inf nboot <- 200 coverage <- 0.95 bootbctype1(plan = plan, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub, nboot = nboot, coverage = coverage)
Computes the bias corrected maximum likelihood estimator under progressive type-I interval censoring scheme using the Bootstrap resampling. It works by obtaining the empirical distribution of the MLE using bootstrap approach and then constructing the percentile confidence intervals (PCI) suggested by DiCiccio and Tibshirani (1987).
bootbctype2(plan, param, mle, cdf, pdf, lb = 0, ub = Inf, nboot = 200, coverage = 0.95)
bootbctype2(plan, param, mle, cdf, pdf, lb = 0, ub = Inf, nboot = 200, coverage = 0.95)
plan |
Censoring plan for progressive type-II censoring scheme. It must be given as a |
param |
Vector of the of the family parameter's names. |
mle |
Vector of the maximum likelihood estimators. |
cdf |
Expression of the cumulative distribution function. |
pdf |
Expression for the probability density function. |
lb |
Lower bound of the family support. That is zero by default. |
ub |
Upper bound of the family's support. That is |
nboot |
Number of Bootstrap resampling. |
coverage |
Confidence or coverage level for constructing percentile confidence intervals. That is 0.95 by default. |
For some families of distributions whose support is the positive semi-axis, i.e., , the cumulative distribution function (cdf) may not be differentiable. In this case, the lower bound of the support of random variable, i.e.,
lb
that is zero by default, must be chosen some positive small value to ensure the differentiability of the cdf.
A list of the outputs including a matrix that represents the variance-covariance matrix of the uncorrected MLE, a matrix that represents the variance-covariance matrix of the corrected MLE, the lower LPCI
, and upped UPCI
, bounds of 95%
percentile confidence interval for param
, the ML estimator, bias value, and bias-corrected estimator. Finally, the goodness-of-fit measures consists of Anderson-Darling (AD
), Cramer-von Misses (CVM
), and Kolmogorov-Smirnov (KS
) statistics.
Mahdi Teimouri
T. J. DiCiccio and R. Tibshirani 1987. Bootstrap confidence intervals and bootstrap approximations. Journal of the American Statistical Association, 82, 163-170.
A. J. Lemonte, F. Cribari-Neto, and K. L. P. Vasconcellos 2007. Improved statistical inference for the two-parameter Birnbaum-Saunders distribution. Computational Statistics and Data Analysis, 51, 4656-4681.
n <- 20 R <- c(9, rep(0, 10) ) param <- c("alpha","beta") mle <- c(0.80, 12) cdf <- quote( 1-exp( -(x/beta)^alpha ) ) pdf <- quote( alpha/beta*(x/beta)^(alpha-1)*exp( -(x/beta)^alpha ) ) lb <- 0 ub <- Inf nboot <- 200 coverage <- 0.95 plan <- rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub) bootbctype2(plan = plan, param = param, mle = mle, cdf = cdf, pdf = pdf, lb = lb, ub = ub, nboot = nboot, coverage = coverage)
n <- 20 R <- c(9, rep(0, 10) ) param <- c("alpha","beta") mle <- c(0.80, 12) cdf <- quote( 1-exp( -(x/beta)^alpha ) ) pdf <- quote( alpha/beta*(x/beta)^(alpha-1)*exp( -(x/beta)^alpha ) ) lb <- 0 ub <- Inf nboot <- 200 coverage <- 0.95 plan <- rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub) bootbctype2(plan = plan, param = param, mle = mle, cdf = cdf, pdf = pdf, lb = lb, ub = ub, nboot = nboot, coverage = coverage)
Computing the bias corrected maximum likelihood estimator (MLE) for the parameters of the general family of distributions under progressive type-I interval censoring scheme. Let represent the lifetimes of
items that independently follow the cumulative distribution function (cdf)
under a progressive type-I interval censoring scheme. We use
to compute the bias corrected ML estimator using the method of Cox and Snell (1968). Let
,
,...,
show a number of
censoring time intervals,
denotes the vector of failed items, and
represents the vector of removed alive items in each interval, from
. A schematic, given by the following, displays the progressive type-I interval censoring scheme. We note that the sample size
is
. Furthermore,
can be determined by the pre-specified percentage of the remaining surviving items at
or equivalently
, for
. Here,
denotes the largest integer less than or equal to
.
row | Time interval |
|
|
1 |
|
|
|
2 |
|
|
|
. | . | . | . |
. | . | . | . |
. | . | . | . |
|
|
|
|
|
|
|
|
coxbctype1(plan, param, mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf, pdf , lb = 0)
coxbctype1(plan, param, mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf, pdf , lb = 0)
plan |
Censoring plan for progressive type-I interval censoring scheme. It must be given as a |
param |
Vector of the of the family parameter's names. |
mle |
A vector that contains MLE of the parameters. |
cdf.expression |
Logical. That is |
pdf.expression |
Logical. That is |
cdf |
Expression of the cumulative distribution function. |
pdf |
Expression of the probability density function. |
lb |
Lower bound of the family's support. That is zero by default. |
For some families of distributions whose support is the positive semi-axis, i.e., , the cumulative distribution function (cdf) may not be differentiable. In this case, the lower bound of the support of random variable, i.e.,
lb
that is zero by default, must be chosen some positive small value to ensure the differentiability of the cdf.
A list of the outputs including: a matric that represents the variance-covariance matrix of the MLE, a matrix that represents the variance-covariance matrix of the bias corrected MLE, a list of three outputs including MLE, bias of MLE, and bias corrected MLE, a list of goodness-of-fit measures consists of Anderson-Darling (AD
), Cramer-von Misses (CVM
), and Kolmogorov-Smirnov (KS
) statistics.
Mahdi Teimouri
Z. Chen 2000. A new two-parameter lifetime distribution with bathtub shape or increasing failure rate function, Statistics & Probability Letters, 49 (2), 155-161.
D. G. Chen and Y. L. Lio 2010. Parameter estimations for generalized exponential distribution under progressive type-I interval censoring, Computational Statistics and Data Analysis, 54, 1581-1591.
D. R. Cox and E. J. Snell, 1968. A general definition of residuals. Journal of the Royal Statistical Society: Series B (Methodological), 30(2), 248-265.
M. Teimouri, 2020. Bias corrected maximum likelihood estimators under progressive type-I interval censoring scheme, https://doi.org/10.1080/03610918.2020.1819320
data(plasma, package="bccp") plan <- data.frame(T = plasma$upper, X = plasma$X, P = plasma$P, R = plasma$R) param <- c("lambda","beta") mle <- c(1.4, 0.05) pdf <- quote( lambda*(1-exp( -(x*beta)))^(lambda-1)*beta*exp( -(x*beta)) ) cdf <- quote( (1-exp( -(x*beta)))^lambda ) lb <- 0 coxbctype1(plan = plan, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb)
data(plasma, package="bccp") plan <- data.frame(T = plasma$upper, X = plasma$X, P = plasma$P, R = plasma$R) param <- c("lambda","beta") mle <- c(1.4, 0.05) pdf <- quote( lambda*(1-exp( -(x*beta)))^(lambda-1)*beta*exp( -(x*beta)) ) cdf <- quote( (1-exp( -(x*beta)))^lambda ) lb <- 0 coxbctype1(plan = plan, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb)
Computing the bias corrected maximum likelihood estimator (MLE) for the parameters of the general family of distributions under progressive type-II censoring scheme.
coxbctype2(plan, param, mle, cdf, pdf, lb = 0, ub = Inf, N = 100)
coxbctype2(plan, param, mle, cdf, pdf, lb = 0, ub = Inf, N = 100)
plan |
Censoring plan for progressive type-II censoring scheme. It must be given as a |
param |
Vector of the of the family parameter's names. |
mle |
Vector of the maximum likelihood estimators. |
cdf |
Expression for the cumulative distribution function. |
pdf |
Expression for the probability density function. |
lb |
Lower bound of the family's support. That is zero by default. |
ub |
Upper bound of the family support. That is |
N |
An even integer value indicating the number of subdivisions for applying Simpson's integration method. |
For some families of distributions whose support is the positive semi-axis, i.e., , the cumulative distribution function (cdf) may not be differentiable. In this case, the lower bound of the support of random variable, i.e.,
lb
that is zero by default, must be chosen some positive small value to ensure the differentiability of the cdf.
A list of the outputs including: a matric that represents the variance-covariance matrix of the MLE, a matrix that represents the variance-covariance matrix of the bias corrected MLE, a list of three outputs including MLE, bias of MLE, and bias corrected MLE, a list of godness-of-fit measures consists of Anderson-Darling (AD
), Cramer-von Misses (CVM
), and Kolmogorov-Smirnov (KS
), statistics.
Mahdi Teimouri
D. R. Cox and E. J. Snell 1968. A general definition of residuals. Journal of the Royal Statistical Society: Series B (Methodological), 30(2), 248-265.
M. Teimouri and S. Nadarajah 2016. Bias corrected MLEs under progressive type-II censoring scheme, Journal of Statistical Computation and Simulation, 86 (14), 2714-2726.
n <- 10 R <- c(5, rep(0, n-6) ) param <- c("alpha","beta") mle <- c(2,6) pdf <- quote( alpha/beta*(x/beta)^(alpha-1)*exp( -(x/beta)^alpha ) ) cdf <- quote( 1-exp( -(x/beta)^alpha ) ) lb <- 0 ub <- Inf N <- 100 plan <- rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub) coxbctype2(plan = plan, param = param, mle = mle, cdf = cdf, pdf = pdf, lb = lb, ub = ub, N = N)
n <- 10 R <- c(5, rep(0, n-6) ) param <- c("alpha","beta") mle <- c(2,6) pdf <- quote( alpha/beta*(x/beta)^(alpha-1)*exp( -(x/beta)^alpha ) ) cdf <- quote( 1-exp( -(x/beta)^alpha ) ) lb <- 0 ub <- Inf N <- 100 plan <- rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub) coxbctype2(plan = plan, param = param, mle = mle, cdf = cdf, pdf = pdf, lb = lb, ub = ub, N = N)
Computes the Fisher information matrix under progressive type-I interval censoring scheme. The Fisher information matrix is given by
where
in which is the family cumulative distribution function for
and
.
fitype1(plan, param, mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf, pdf , lb = 0)
fitype1(plan, param, mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf, pdf , lb = 0)
plan |
Censoring plan for progressive type-I interval censoring scheme. It must be given as a |
param |
Vector of the of the family parameter's names. |
mle |
Vector of the maximum likelihood estimators. |
cdf.expression |
Logical. That is |
pdf.expression |
Logical. That is |
cdf |
Expression of the cumulative distribution function. |
pdf |
Expression of the probability density function. |
lb |
Lower bound of the family support. That is zero by default. |
For some families of distributions whose support is the positive semi-axis, i.e., , the cumulative distribution function (cdf) may not be differentiable. In this case, the lower bound of the support of random variable, i.e.,
lb
that is zero by default, must be chosen some positive small value to ensure the differentiability of the cdf.
Matrices that represent the expected and observed Fisher information matrices.
Mahdi Teimouri
N. Balakrishnan and E. Cramer. 2014. The art of progressive censoring. New York: Springer.
D. G. Chen and Y. L. Lio 2010. Parameter estimations for generalized exponential distribution under progressive type-I interval censoring, Computational Statistics and Data Analysis, 54, 1581-1591.
M. Teimouri 2020. Bias corrected maximum likelihood estimators under progressive type-I interval censoring scheme, Communications in Statistics-Simulation and Computation, doi.org/10.1080/036 10918.2020.1819320
data(plasma) n <- 20 param <- c("alpha","beta") mle <- c(0.4, 0.05) cdf <- quote( 1-exp( beta*(1-exp( x^alpha )) ) ) pdf <- quote( exp( beta*(1-exp( x^alpha )) )*( beta*(exp( x^alpha )*(x^(alpha-1)*alpha) )) ) lb <- 0 plan <- rtype1(n = n, P = plasma$P, T = plasma$upper, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb) fitype1(plan = plan, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb)
data(plasma) n <- 20 param <- c("alpha","beta") mle <- c(0.4, 0.05) cdf <- quote( 1-exp( beta*(1-exp( x^alpha )) ) ) pdf <- quote( exp( beta*(1-exp( x^alpha )) )*( beta*(exp( x^alpha )*(x^(alpha-1)*alpha) )) ) lb <- 0 plan <- rtype1(n = n, P = plasma$P, T = plasma$upper, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb) fitype1(plan = plan, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb)
Computes the Fisher information matrix under progressive type-I interval censoring scheme. The Fisher information matrix is given by
where
in which is the family cumulative distribution function for
and
, and
.
fitype2(plan, param, mle, cdf, pdf, lb = 0, ub = Inf, N = 100)
fitype2(plan, param, mle, cdf, pdf, lb = 0, ub = Inf, N = 100)
plan |
Censoring plan for progressive type-II censoring scheme. It must be given as a |
param |
Vector of the of the family parameter's names. |
mle |
Vector of the maximum likelihood estimators. |
cdf |
Expression for the cumulative distribution function. |
pdf |
Expression for the probability density function. |
lb |
Lower bound of the family support. That is zero by default. |
ub |
Upper bound of the family support. That is |
N |
An even integer value indicating the number of subdivisions for applying Simpson's integration method. |
For some families of distributions whose support is the positive semi-axis, i.e., , the cumulative distribution function (cdf) may not be differentiable. In this case, the lower bound of the support of random variable, i.e.,
lb
that is zero by default, must be chosen some positive small value to ensure the differentiability of the cdf.
Matrices that represent the expected and observed Fisher information matrices.
Mahdi Teimouri
N. Balakrishnan and AHMED Hossain 2007. Inference for the Type II generalized logistic distribution under progressive Type II censoring, Journal of Statistical Computation and Simulation, 77(12), 1013-1031.
M. Teimouri and S. Nadarajah 2016. Bias corrected MLEs under progressive type-II censoring scheme, Journal of Statistical Computation and Simulation, 86 (14), 2714-2726.
n <- 20 R <- c(5, rep(0, n-6) ) param <- c("alpha","beta") mle <- c(2,6) pdf <- quote( alpha/beta*(x/beta)^(alpha-1)*exp( -(x/beta)^alpha ) ) cdf <- quote( 1-exp( -(x/beta)^alpha ) ) lb <- 0 ub <- Inf N <- 100 plan <- rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub) fitype2(plan = plan, param = param, mle = mle, cdf = cdf, pdf = pdf, lb = lb, ub = ub, N = N)
n <- 20 R <- c(5, rep(0, n-6) ) param <- c("alpha","beta") mle <- c(2,6) pdf <- quote( alpha/beta*(x/beta)^(alpha-1)*exp( -(x/beta)^alpha ) ) cdf <- quote( 1-exp( -(x/beta)^alpha ) ) lb <- 0 ub <- Inf N <- 100 plan <- rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub) fitype2(plan = plan, param = param, mle = mle, cdf = cdf, pdf = pdf, lb = lb, ub = ub, N = N)
The goodness-of-fit (GOF) measures consist of Anderson-Darling (AD
) and Cram\'eer-von Misses (CVM
) statistics for progressive type-I interval censoring scheme are given, respectively, by
where ,
, and
, for
.
goftype1(plan, param, mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf, pdf , lb = 0)
goftype1(plan, param, mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf, pdf , lb = 0)
plan |
Censoring plan for progressive type-I interval censoring scheme. It must be given as a |
param |
Vector of the of the family parameter's names. |
mle |
Vector of the estimated parameters. |
cdf.expression |
Logical. That is |
pdf.expression |
Logical. That is |
cdf |
Expression of the cumulative distribution function. |
pdf |
Expression of the probability density function. |
lb |
Lower bound of the family support. That is zero by default. |
We note that for lifetime distributions whose support is the positive semi-axis, i.e., , the cumulative distribution function (cdf) may not be differentiable. In this case, the lower bound of the support of random variable, i.e.,
lb
that is zero by default, must be chosen some positive small value to ensure the differentiability of the cdf. Theoretically, for lifetime distribution, we have lb
.
A vector of goodness-of-fit measures consist of Anderson-Darling (AD
) and Cramer-von Misses (CVM
) statistics.
Mahdi Teimouri
M. Teimouri 2020. Bias corrected maximum likelihood estimators under progressive type-I interval censoring scheme, Communications in Statistics-Simulation and Computation, https://doi.org/10.10 80/03610918.2020.1819320.
data(plasma) n <- 20 param <- c("alpha","beta") mle <- c(0.4, 0.05) cdf <- quote( 1-exp( beta*(1-exp( x^alpha )) ) ) pdf <- quote( exp( beta*(1-exp( x^alpha )) )*( beta*(exp( x^alpha )*(x^(alpha-1)*alpha) )) ) lb <- 0 plan <- rtype1(n = n, P = plasma$P, T = plasma$upper, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb) goftype1(plan = plan, param = param, mle = mle, cdf.expression=TRUE, pdf.expression = FALSE, cdf = cdf, pdf = pdf, lb = lb)
data(plasma) n <- 20 param <- c("alpha","beta") mle <- c(0.4, 0.05) cdf <- quote( 1-exp( beta*(1-exp( x^alpha )) ) ) pdf <- quote( exp( beta*(1-exp( x^alpha )) )*( beta*(exp( x^alpha )*(x^(alpha-1)*alpha) )) ) lb <- 0 plan <- rtype1(n = n, P = plasma$P, T = plasma$upper, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb) goftype1(plan = plan, param = param, mle = mle, cdf.expression=TRUE, pdf.expression = FALSE, cdf = cdf, pdf = pdf, lb = lb)
The goodness-of-fit (GOF) measures consist of Anderson-Darling (AD
), Cramer-von Misses (CVM
), and log-likelihood statistics for progressive type-II censoring scheme.
goftype2(plan, param, mle, cdf, pdf)
goftype2(plan, param, mle, cdf, pdf)
plan |
Censoring plan for progressive type-II censoring scheme. It must be given as a |
param |
Vector of the of the family parameter's names. |
mle |
Vector of the maximum likelihood estimators. |
cdf |
Expression for the cumulative distribution function. |
pdf |
Expression for the probability density function. |
Mahdi Teimouri
R. Pakyari and N. Balakrishnan 2012. A general purpose approximate goodness-of-fit for progressively Type-II censored data, IEEE Transaction on Reliability, 61, 238-244.
n <- 20 R <- c(5, rep(0, n-6) ) param <- c("alpha","beta") mle <- c(2,6) pdf <- quote( alpha/beta*(x/beta)^(alpha-1)*exp( -(x/beta)^alpha ) ) cdf <- quote( 1-exp( -(x/beta)^alpha ) ) lb <- 0 ub <- Inf plan <- rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub) goftype2(plan = plan, param = param, mle = mle, cdf = cdf, pdf = pdf)
n <- 20 R <- c(5, rep(0, n-6) ) param <- c("alpha","beta") mle <- c(2,6) pdf <- quote( alpha/beta*(x/beta)^(alpha-1)*exp( -(x/beta)^alpha ) ) cdf <- quote( 1-exp( -(x/beta)^alpha ) ) lb <- 0 ub <- Inf plan <- rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub) goftype2(plan = plan, param = param, mle = mle, cdf = cdf, pdf = pdf)
Computes the MLE of for the parameters of the model fitted to a progressive type-I interval censoring scheme with likelihood function
in which is the family cumulative distribution function for
provided that
.
mletype1(plan, param, start, cdf.expression = FALSE, pdf.expression = TRUE, cdf, pdf, method = "Nelder-Mead", lb = 0, ub = Inf, level = 0.05)
mletype1(plan, param, start, cdf.expression = FALSE, pdf.expression = TRUE, cdf, pdf, method = "Nelder-Mead", lb = 0, ub = Inf, level = 0.05)
plan |
Censoring plan for progressive type-I interval censoring scheme. It must be given as a |
param |
Vector of the of the family parameter's names. |
start |
Vector of the initial values. |
cdf.expression |
Logical. That is |
pdf.expression |
Logical. That is |
cdf |
Expression of the cumulative distribution function. |
pdf |
Expression of the probability density function. |
method |
The method for the numerically optimization that includes one of |
lb |
Lower bound of the family's support. That is zero by default. |
ub |
Upper bound of the family's support. That is |
level |
Significance level for constructing asymptotic confidence interval That is |
MLE, standard error of MLE, and asymptotic confidence interval for MLE.
Mahdi Teimouri
data(plasma, package="bccp") plan <- data.frame(T = plasma$upper, X = plasma$X, P = plasma$P, R = plasma$R) param <- c("lambda","beta") mle <- c(1.4, 0.05) pdf <- quote( lambda*(1-exp( -(x*beta)))^(lambda-1)*beta*exp( -(x*beta)) ) cdf <- quote( (1-exp( -(x*beta)))^lambda ) lb <- 0 ub <- Inf level <- 0.05 mletype1(plan = plan, param = param, start = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, method = "Nelder-Mead", lb = lb, ub = ub, level = level)
data(plasma, package="bccp") plan <- data.frame(T = plasma$upper, X = plasma$X, P = plasma$P, R = plasma$R) param <- c("lambda","beta") mle <- c(1.4, 0.05) pdf <- quote( lambda*(1-exp( -(x*beta)))^(lambda-1)*beta*exp( -(x*beta)) ) cdf <- quote( (1-exp( -(x*beta)))^lambda ) lb <- 0 ub <- Inf level <- 0.05 mletype1(plan = plan, param = param, start = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, method = "Nelder-Mead", lb = lb, ub = ub, level = level)
Computes the MLE of for the parameters of the model fitted to a progressive type-II censoring scheme with likelihood function
in which is the family cumulative distribution function for
and
, and
.
mletype2(plan, param, start, cdf, pdf, method = "Nelder-Mead", lb = 0, ub = Inf, N = 100, level = 0.05)
mletype2(plan, param, start, cdf, pdf, method = "Nelder-Mead", lb = 0, ub = Inf, N = 100, level = 0.05)
plan |
Censoring plan for progressive type-II censoring scheme. It must be given as a |
param |
Vector of the of the family parameter's names. |
start |
Vector of the initial values. |
pdf |
Expression of the probability density function. |
cdf |
Expression of the cumulative distribution function. |
method |
The method for the numerically optimization that includes one of |
lb |
Lower bound of the family's support. That is zero by default. |
ub |
Upper bound of the family's support. That is |
N |
An even integer number indicating the number of subdivisions for applying Simpson's integration method. |
level |
Significance level for constructing asymptotic confidence interval That is |
MLE, standard error of MLE, and asymptotic confidence interval for MLE.
Mahdi Teimouri
M. Teimouri and S. Nadarajah 2016. Bias corrected MLEs under progressive type-II censoring scheme, Journal of Statistical Computation and Simulation, 86 (14), 2714-2726.
n <- 10 R <- c(5, rep(0, n-6) ) param <- c("alpha","beta") mle <- c(2,6) pdf <- quote( alpha/beta*(x/beta)^(alpha-1)*exp( -(x/beta)^alpha ) ) cdf <- quote( 1-exp( -(x/beta)^alpha ) ) lb <- 0 ub <- Inf N <- 100 level <- 0.05 plan <- rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub) mletype2(plan = plan, param = param, start = mle, cdf = cdf, pdf = pdf, method = "Nelder-Mead", lb = lb, ub = ub, N = N, level = level)
n <- 10 R <- c(5, rep(0, n-6) ) param <- c("alpha","beta") mle <- c(2,6) pdf <- quote( alpha/beta*(x/beta)^(alpha-1)*exp( -(x/beta)^alpha ) ) cdf <- quote( 1-exp( -(x/beta)^alpha ) ) lb <- 0 ub <- Inf N <- 100 level <- 0.05 plan <- rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub) mletype2(plan = plan, param = param, start = mle, cdf = cdf, pdf = pdf, method = "Nelder-Mead", lb = lb, ub = ub, N = N, level = level)
The plasma survival data contains the Survival times of plasma cell myeloma for 112 patients, see Carbone et al. (1967).
data(plasma)
data(plasma)
A text file with 4 columns.
P. P. Carbone, L. E. Kellerhouse, and E. A. Gehan 1967. Plasmacytic myeloma: A study of the relationship of survival to various clinical manifestations and anomalous protein type in 112 patients. The American Journal of Medicine, 42 (6), 937-48.
data(plasma)
data(plasma)
In order to investigate the effectiveness of an anesthetic
antibiotic ointment in relieving pain caused by wounds, a number of 30 patients take part in a
test where 10 of them are removed from the test under censoring plan at times
and
. We note that the termination time is not fixed, but
it is assumed that
sufficiently large to ensure that no observation is right censored,
see Balakrishnan and Cramer (2014).
data(relief)
data(relief)
A text file with 20 observations.
N. Balakrishnan and E. Cramer 2014. The Art of Progressive Censoring. New York, Springer.
data(relief)
data(relief)
Simulates a progressive type-I interval censoring scheme when censoring times and percentage of removed items in end of each interval are given in a data.frame
structure.
rtype1(n, P, T, param, mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf, pdf, lb = 0)
rtype1(n, P, T, param, mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf, pdf, lb = 0)
n |
Number of items placed on the test at time zero. |
P |
A vector of upper bounds of the censoring times |
T |
A vector that contains percentage |
param |
A character vector that contains the name of family's parameters. |
mle |
A vector that contains of the maximum likelihood estimators of the parameters. |
cdf.expression |
Logical. That is |
pdf.expression |
Logical. That is |
cdf |
Expression of the cumulative distribution function. |
pdf |
Expression of the probability density function. |
lb |
Lower bound of the family's support. That is zero by default. |
For a family of distributions whose support is the positive semi-axis, i.e., , the cumulative distribution function (cdf) may not be differentiable. In this case, the lower bound of the support of random variable, i.e.,
lb
that is zero by default, must be chosen some positive small value to ensure the differentiability of the cdf.
A data frame with four columns including censoring times, number of failed items in each interval, number of removed subjects in end of each interval, and percentage of removed items in end of each interval.
Mahdi Teimouri
R. Aggarwala 2001. Progressive interval censoring: some mathematical results with applications to inference. Communications in Statistics-Theory and Methods, 30(8&9), 1921–1935.
data(plasma) n <- 112 param <- c("alpha","beta") mle <- c(0.4, 0.05) cdf <- quote( 1-exp( beta*(1-exp( x^alpha )) ) ) pdf <- quote( exp( beta*(1-exp( x^alpha )) )*( beta*(exp( x^alpha )*( x^(alpha-1)*alpha ) )) ) lb <- 0 rtype1(n = n, P = plasma$P, T = plasma$upper, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb)
data(plasma) n <- 112 param <- c("alpha","beta") mle <- c(0.4, 0.05) cdf <- quote( 1-exp( beta*(1-exp( x^alpha )) ) ) pdf <- quote( exp( beta*(1-exp( x^alpha )) )*( beta*(exp( x^alpha )*( x^(alpha-1)*alpha ) )) ) lb <- 0 rtype1(n = n, P = plasma$P, T = plasma$upper, param = param, mle = mle, cdf.expression = FALSE, pdf.expression = TRUE, cdf = cdf, pdf = pdf, lb = lb)
Simulates a progressive type-II censoring scheme.
rtype2(n, R, param, mle, cdf, lb = 0, ub = Inf)
rtype2(n, R, param, mle, cdf, lb = 0, ub = Inf)
n |
Number of items placed on the test at time zero. |
R |
A vector that contains number |
param |
Character vector that contains the name of family's parameters. |
mle |
The maximum likelihood estimators of the parameters. |
cdf |
Expression for the cumulative distribution function. |
lb |
Lower bound of the family's support. That is zero by default. |
ub |
Upper bound of the family's support. That is |
A data frame with two columns including observed liftimes X
, and number of censored items R
.
Mahdi Teimouri
N. Balakrishnan and R. A. Sandhu 1995. A Simple Simulational Algorithm for Generating Progressive Type-II Censored Samples. The American Statistician, 49(2), 229-230.
n <- 20 R <- c(9, rep(0, 10) ) param <- c("alpha","beta") mle <- c(0.80, 12) cdf <- quote( 1-exp( beta*(1-exp( x^alpha )) ) ) lb <- 0 ub <- Inf rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub)
n <- 20 R <- c(9, rep(0, 10) ) param <- c("alpha","beta") mle <- c(0.80, 12) cdf <- quote( 1-exp( beta*(1-exp( x^alpha )) ) ) lb <- 0 ub <- Inf rtype2(n = n, R = R, param = param, mle = mle, cdf = cdf, lb = lb, ub = ub)
Computes the integration for a real-valued function.
simpson(fun, lb, ub, N = 100)
simpson(fun, lb, ub, N = 100)
fun |
Integrand expression |
lb |
Lower bound of integration. |
ub |
Upper bound of integration. |
N |
An even integer value indicating the number of subdivisions for applying Simpson's integration method. |
Mahdi Teimouri
E. Suli and D. Mayers 2003. An Introduction to Numerical Analysis, Cambridge University Press.
fun <- function(x) 1/sqrt( 2*pi*sigma^2 )*exp( -.5*(x-mu)^2/sigma^2 ) mu <- 0 sigma <- 1 lb <- 0 ub <- Inf N <- 100 simpson(fun = fun, lb = lb, ub = ub, N = N)
fun <- function(x) 1/sqrt( 2*pi*sigma^2 )*exp( -.5*(x-mu)^2/sigma^2 ) mu <- 0 sigma <- 1 lb <- 0 ub <- Inf N <- 100 simpson(fun = fun, lb = lb, ub = ub, N = N)
It contains a welcome message for user of package bccp.