Learn R Programming

ICE (version 0.69)

ickde: Interval-Censored Kernel Density Estimation

Description

Iterated conditional expectation kernel density estimation using a local constant. The bandwidth is assumed fixed. (See the example for a way to get a quick ballpark estimate of the bandwidth.) The gaussian, epanechnikov and biweight kernels can be used. Note that the bandwidth estimate would have to be adjusted before using with epanechnikov or biweight.

Usage

ickde(I, h, f, m, n.iterations = 10, x1, xm, right.limit = 10000,kernel="gaussian", old=TRUE)

Arguments

I
A matrix with two columns, consisting of left and right endpoints of the interval data
h
A scalar bandwidth
f
An initial estimate of the density at a sequence of grid points (optional; if this is used, do not specify m)
m
The number of (equally-spaced) grid points at which the density is to be estimated
n.iterations
The maximum number of iterations allowed
x1
The left-most grid point (optional)
xm
The right-most grid point (optional)
right.limit
For right-censored data, the value to be used as an artificial right endpoint for the intervals
kernel
character argument indicated choice of kernel; current choices are "gaussian", "epanechnikov", "biweight"
old
logical value, indicating whether denominators in conditional expectation calculation should use the previous value of the density estimate.

Value

IC

References

Braun, J., Duchesne, T. and Stafford, J.E. (2005) Local likelihood density estimation for interval censored data. Canadian Journal of Statistics 33: 39-60.

Examples

Run this code
 tmp <- apply(ICHemophiliac, 1, mean)
 h <- try(dpik(tmp), silent=T) # dpik() will work if KernSmooth is loaded
 if (class(h) !="numeric" ) h <- .9  # this makes the example work 
                       # if KernSmooth is not loaded
 estimate <- ickde(ICHemophiliac, m=200, h=h)
 plot(estimate, type="l")

Run the code above in your browser using DataLab