Learn R Programming

EstSimPDMP (version 1.2)

HR: Estimator of the hazard rate function by a kernel method

Description

The function computes the estimator of the hazard rate function from positive data. This is the smoothed estimator given in the article written by Ramlau-Hansen. The kernel must be continuous with support [-1,1]. The chosen kernel is the Epanechnikov kernel.

Usage

HR(dat,t,h,alpha,bound)

Arguments

dat
data from which the estimator is to be computed.
t
the estimator is computed at time t.
h
bandwith
alpha
strictly positive real number. If h is NULL, the bandwith is 1/n^alpha where n is the number of data.
bound
the estimator is computed as an integral between the times 0 and bound. bound may be the deterministic time of censorship. The default value is Inf: it means that there is no censorship.

References

Ramlau-Hansen H. Smoothing counting process intensities by means of kernel functions The Annals of Statistics, Vol. 11, No.2, (1983) 453-466

Andersen P.K., Borgan O., Gill R.D., Keiding N. Statistical models based on counting processes Springer Series in Statistics. Springer-Verlag, New-York (1993)

See Also

CHR, plotHR

Examples

Run this code
# HR

# Simulation of 50 independent exponential random variables
dat<-rexp(50,1)

# Estimation of the exponential hazard rate at time 0.4
HR(dat,0.4)

Run the code above in your browser using DataLab