Last data update: 2014.03.03

R: Interval-Censored Kernel Density Estimation
 ickde R Documentation

## 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

An object of class `IC`

W.J. Braun

### 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

``` 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")
```

### Results

```
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ICE)
Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ICE/ickde.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ickde
> ### Title: Interval-Censored Kernel Density Estimation
> ### Aliases: ickde
> ### Keywords: models
>
> ### ** Examples
>
>  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")
>
>
>
>
>
> dev.off()
null device
1
>

```