Description Usage Arguments Details Value References See Also Examples
Calculation of the integrand of the contant term in the AMISE plugin bandwidth rule implemented in PlugInBand
.
1 | HRSurv(x, xin, cens, h, kfun)
|
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. |
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.
A vector with the value of the fraction.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.