View source: R/nearest.neighbors.1d.R
This performs nearest neighbors estimation in one dimension. For higher dimensional analysis, this can be the propensity score.
1 | nearest.neighbors.1d(Y, X, k = 1, space)
|
Y |
A vector of outcomes |
X |
A vector of predictors |
k |
The number of neighbors to use |
space |
The values at which to predict |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.