Description Usage Arguments Details Value

Calculate *T_n* using directed K-NN graph or minimum spanning tree (MST).

1 | ```
TnKnn(Y, X, k, Knn = 1)
``` |

`Y` |
a matrix of response (n by dy) |

`X` |
a matrix of predictors (n by dx) |

`k` |
a function |

`Knn` |
the number of K-nearest neighbor to use; or "MST". |

*T_n* is an estimate of *E[E[k(Y_1,Y_1')|X]]*, with *Y_1*, *Y_1'* drawn iid from *Y|X*, given *X*.
For K-NN graph, ties will be broken at random. Algorithm finding the MST is implemented the package `emstreeR`

.

The algorithm returns a real number which is the value of Tn.

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.