Description Usage Arguments Examples
For multiple metrics - Euclidean and Mahalanobis Written for data.table arguments.
1 2 3 4 5 6 7 8 9 | my.knn(
Yvar,
Xvars,
read_data,
predict_data,
metric = "mahalanobis",
tolerance = 1e-16,
K = 1L
)
|
Yvar |
Dependent variable |
Xvars |
Character vector of control variables |
read_data |
Of type data.table - source of data |
predict_data |
Of type data.table - points for prediction |
metric |
Metric for comparison |
tolerance |
Tolerance level for matrix inversion |
K |
number of neighbors |
1 | my.knn()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.