HRSurv {NPHazardRate}R Documentation

Estimate of the constant in the optimal AMISE expression

Description

Calculation of the integrand of the contant term in the AMISE plugin bandwidth rule implemented in PlugInBand.

Usage

HRSurv(x, xin, cens, h, kfun) 

Arguments

xin

A vector of data points

x

The point at which the estimates should be calculated.

cens

Censoring Indicators.

h

bandwidth to use.

kfun

The kernel function to use.

Details

Calculates the term

\frac{\lambda_T(x)}{1-F(x)}\,dx

which is passed then as argument to the function NP.M.Estimate for numerical integtaion. Currrently the fraction is estimated by

\frac{\hat \lambda(x;b)}{1-\hat F(x)}

where \hat \lambda(x;b) is implemented by HazardRateEst using bandwidth bw.nrd{xin}. For 1-\hat F(x) the Kaplan-Meier estimate KMest is used.

Value

A vector with the value of the fraction.

References

Hua, Patil and Bagkavos, An $L_1$ analysis of a kernel-based hazard rate estimator, Australian and New Zealand J. Statist., (60), 43-64, (2018).

See Also

PlugInBand, NP.M.Estimate

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

HRSurv(x, x1, cen, bw.nrd(x1), Biweight)

[Package NPHazardRate version 0.1 Index]