HRSurv: Estimate of the constant in the optimal AMISE expression

Description Usage Arguments Details Value References See Also Examples

View source: R/HRSurv.R

Description

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

Usage

1
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{λ_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 λ(x;b)}{1-\hat F(x)}

where \hat λ(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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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)

NPHazardRate documentation built on May 2, 2019, 10:24 a.m.