Description Usage Arguments Details Value
Calculates the number of swaps required to move from one order to another.
1 | calc.nswaps(map1, map2)
|
map1 |
Vector of marker positions or ranks. |
map2 |
Vector of marker positions or ranks. |
This is intended to be used when comparing an estimated marker ordering to
some perceived "truth". It is most likely to be useful when dealing with
simulated data where the concept of truth makes most sense. It calculates
the minimum number of single place swaps that would be needed to move from
map1
to map2
and it does this by reverse engineering kendall's tau b
correlation coefficient
τ=2(C-D)/N
where N is the total number of pairs of markers, C the number of concordant pairs and D the number of discordant pairs. If there are n markers then the total number of pairs N=nC_2 and C=N-D so D=0.5 nC_2(1-τ) and the minimum number of swaps is the minimum of D and N-D
Scalar giving the number of swaps.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.