censored Weibull MLE for Type I rightcensored data
Description
Calculate the censored Weibull (two parameter, shape and scale) MLE for the Type I censored data with the algorithm described in ASTM 5457(2004). Return the estimates of the shape and scale parameters. A comprehesive description of this algorithm can be found in Liu (2012).
Usage
1  cenWbMLE.T1(dat, Cx=NULL, useC = FALSE, conCr = 1e09, nIter = 1000)

Arguments
dat 
A vector of the data, should not contain any negative observations, but NA is allowed.
The NA's and observations larger than the censoring threshold 
Cx 
The censoring threshold of Type I rightcensoring. If NULL, the complete (uncensored MLE) will be calculated. 
useC 
Default to be false and use the R routine to calculate estimates. If true, the function will use the C routine, which is much faster than the R routine, but harder for the user to identify the numerical issues (if there is any). 
conCr 
In terms of the relative change in the negative loglikelihood.
The algorithm is viewed as converged if the relative change is smaller than 
nIter 
The maximum numer of iterations allowed in the function. 
Value
convergence 
an integer indicating why the algorithm terminated

estimates 
Shape and scale parameter estimates 
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
ASTM (2004). Standard specfication for computing reference resistance of woodbased materials and structural connections for load and resistance factor design D5457. American Society for Testing Materials, Philadephia, Pa.
Liu Y. (2012). Lower Quantile Estimation of Wood Strength Data. Master Thesis, Department of Statistics, UBC. Downloadable here.
See Also
rweibull
, cenWbMLE.T2
, emCenWbMix.T1
Examples
1 2 3 4 5 6 7 8 9 10  set.seed(1)
y < sort(rweibull(100, 7, 7)) ##Generate the data
cenWbMLE.T1(y) #The MLE for the complete data
cenWbMLE.T1(y, 5) #Censor the data at 5 and calculate the censored MLE
##Or
newy < rep(NA, 100)
newy[y<=5] < y[y<=5] #Censor the data at 5
fit < cenWbMLE.T1(newy, 5) #Calculate the censored MLE
qweibull(0.05, fit$estimates[1], fit$estimates[2])
#Calculate the 5% quantile of the fitted distribution.
