Description Usage Arguments Value Author(s) References See Also Examples

Nearest neighborhoods for the values of a continuous predictor. The result is used for the conditional Kaplan-Meier estimator and other conditional product limit estimators.

1 | ```
neighborhood(x, bandwidth = NULL, kernel = "box")
``` |

`x` |
Numeric vector – typically the observations of a continuous random variate. |

`bandwidth` |
Controls the distance between neighbors in a neighborhood.
It can be a decimal, i.e.\ the bandwidth, or the string ‘"smooth"’, in which
case |

`kernel` |
Only the rectangular kernel ("box") is implemented. |

An object of class 'neighborhood'. The value is a list that
includes the unique values of ‘x’ (`values`

) for which a neighborhood,
consisting of the nearest neighbors, is defined by the first neighbor
(`first.nbh`

) of the usually very long vector `neighbors`

and the
size of the neighborhood (`size.nbh`

).

Further values are the arguments `bandwidth`

, `kernel`

, the total
sample size `n`

and the number of unique values `nu`

.

Thomas Gerds

Stute, W. "Asymptotic Normality of Nearest Neighbor Regression
Function Estimates", *The Annals of Statistics*, 1984,12,917–926.

1 2 | ```
d <- SimSurv(20)
neighborhood(d$X2)
``` |

prodlim documentation built on April 18, 2018, 9:04 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.