PlugInBand {NPHazardRate} | R Documentation |
Simple Plug in badnwidth selector
Description
Provides the asymptotic MISE optimal plug-in bandwidth for the hazard rate estimator HazardRateEst
, see Hua, Patil and Bagkavos (2018). The bandwidth is also suitable for use as a pilot bandwidth in TransHazRateEst
and VarBandHazEst
.
Usage
PlugInBand(xin, xout, cens, kfun )
Arguments
xin |
A vector of data points |
xout |
The point at which the estimates should be calculated. |
cens |
Censoring Indicators. |
kfun |
A kernel function. |
Details
The asymptotic MISE optimal plug-in bandwidth selector for HazardRateEst
is defined by
see (9) in Hua, Patil and Bagkavos (2018). The estimate of to be used in
is
Also,
is estimated by applying the extended Simpson's numerical integration rule, SimpsonInt
, on
where is estimated by
KMest
. The estimation is implemented in the NP.M.Estimate
function.
Currently is estimated by
bw.nrd
. However according to (11) in Hua, Patil and Bagkavos (2018)., in future versions this package will support
where
and is already estimated by
NP.M.Estimate
as expalined above (it will be much more stable than using a Weibull reference model).
Value
A scalar with the value of the suggested bandwidth.
References
See Also
Examples
x<-seq(0, 5,length=100) #design points where the estimate will be calculated
SampleSize<-100 #amount of data to be generated
ti<- rweibull(SampleSize, .6, 1) # draw a random sample
ui<-rexp(SampleSize, .2) # censoring sample
cat("\n AMOUNT OF CENSORING: ", length(which(ti>ui))/length(ti)*100, "\n")
x1<-pmin(ti,ui) # observed data
cen<-rep.int(1, SampleSize) # initialize censoring indicators
cen[which(ti>ui)]<-0 # 0's correspond to censored indicators
huse1<- PlugInBand(x1, x, cen, Biweight)
huse1