Learn R Programming

extWeibQuant (version 1.1)

bootstrapCenWbMix: Bootstrap Censored Weibull Mixture for censoring threshold selection and standard error of the quantile estimates

Description

Similarly as in bootstrapCMLE, We will bootstrap the data set to obtain the MSE and SE of the quantile estimate under a certain subjective censoring threshold. Warning: The computation burden of this function is extremely heavy.

Usage

bootstrapCenWbMix(dat, qInt = 0.05, canSet = c(0.5, 0.7, 1), B = 1000, iniVec = NULL, randSeed = NULL, conCr = 1e-06, nIter = 1000)

Arguments

dat
The complect data set. See bootstrapCMLE
qInt
Quantile of interest. See bootstrapCMLE
canSet
Candidate set of thresholds. See bootstrapCMLE
B
Number of bootstrap replicates
iniVec
A vector of length 6*length(canSet), supplying the initial values of the EM algorithm under each censoring threshold for the original data set. Should be orginized in the following way (p, 1-p, a_1, a_2, b_1, b_2, p, 1-p, ...). If null, the initial values will be generated randomly, which is not recommended.
randSeed
conCr
Same as in emCenWbMix.T1
nIter
Same as in emCenWbMix.T1

Value

results
A matrix of length(canSet) by four. The first column is the candidate threshold (proportion). The second column is the quantile estimate under this censoring threshold. The third column and fourth column are the bootstrap estimate of the standard error (SE) and root mean squared error (RMSE) of this quantile estimate.
parameters
A matrix of length(canSet) by six, recording the parameter estimates of the Weibull mixture under each threshold.
bQEst
A matrix of B-by-length(canSet). The quantile estimates under each censoring threshold for each bootstrap replicate.

Details

The EM algorithm for Weibull mixture is extremely senstive to the initial value, so the user should always try to find proper initial values for each threshold and data set.

The initial values in the argument are for the original data set. The EM algorithm for the original data set will be first carried out from these initial values. If they succesfully converged, the EM algorithm for the bootstrap data sets will start from the estimates of the original data set in the previous step. Otherwise, the EM algorithm will start from the initial value in the arguements. Although we could not gurantee the "global" maximum can be reached for each bootstrap replicate under this scheme, our simulation shown that it works reasonably well.

Similarly as bootstrapCMLE, the main calculation of this function is done in C.

References

Liu Y. (2012). Lower Quantile Estimation of Wood Strength Data. Master Thesis, Department of Statistics, UBC. Downloadable here.

See Also

bootstrapCMLE

Examples

Run this code
###
mmix = rbind(c(0.7, 5, 7),c(0.3, 15, 6))
vmix = c(mmix) #A vector version of the paramters
set.seed(1)
y <- sort(simWbMix(100, mmix)) #Generate Data
#Run the EM for 70% Type II censoring
mix70 <- emCenWbMix.T2(y[1:70], 100, iniParam=vmix, useC=TRUE)
#Run the EM for the complete data set
mix100<- emCenWbMix.T2(y, 100, iniParam=vmix, useC=TRUE)
#Use bootstrap with the previous estimates as initials
bootstrapCenWbMix(y, canSet=c(0.7, 1), 
		iniVec=c(c(mix70$estimates), c(mix100$estimates)), B=5,randSeed=1)
#Or use the "true" value as the initials.
bootstrapCenWbMix(y, canSet=c(0.7, 1), iniVec=c(vmix, vmix), B=5,randSeed=1)
#B=5 is just for illustration. It should be at least 1000.

Run the code above in your browser using DataLab