bootstrapCenWbMix: Bootstrap Censored Weibull Mixture for censoring threshold...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/rv5.r

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

1
2
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

See bootstrapCMLE

conCr

Same as in emCenWbMix.T1

nIter

Same as in emCenWbMix.T1

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.

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.

Note

Please report the numerical problems and inconvenience when using this function to the author.

Author(s)

Yang (Seagle) Liu <yang.liu@stat.ubc.ca>

References

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

See Also

bootstrapCMLE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
###
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.

extWeibQuant documentation built on May 1, 2019, 10:31 p.m.