Description Usage Arguments See Also

This function calculates D11 and D22 for the CrossNN test when k-NN (k>1) is used.

1 | ```
getDk(distM,treated.index,k)
``` |

`distM` |
The distance matrix for the pooled observations (pooled over the treated subjects and the matched controls). If there are n treated subjects and n matched controls, then this distance matrix is a 2n by 2n matrix with the [i,j] element the distance between observation i and observation j. What distance to use is decided by users. Some simple choices are the Euclidean distance, L1 distance, and mahalanobis distance. |

`treated.index` |
The subject indices of the treated subjects. The subjects are ordered in the same way as for calculating the distance matrix, distM. |

`k` |
An integer larger than 1. |

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.