Description Usage Arguments Details See Also Examples
The positions of legend and p value in the histogram generated from function StrDif may not be ideal for different (permutations on differences of normalized Levenshtein distances) situations. HistDif customizes the positions of legend and p value in the histogram of the statistical difference of two groups of strings.
1 | HistDif(dif.vec, obsDif, pvalue, o.x = 0.01, o.y = 0, p.x = 0.015, p.y = 0)
|
dif.vec |
Vector containing differences of normalized Levenshtein differences (LD) from the permutation test. |
obsDif |
The "observed" or original difference between between-group and within-group normalized LD. |
pvalue |
p value of the permutation test. |
o.x |
x coordinate of the legend in the histogram, default is 0.01. |
o.y |
y coordinate of the legend in the histogram, default is 0. |
p.x |
x coordinate of the p value in the histogram, default is 0.015. |
p.y |
y coordinate of the p value in the histogram, default is 0. |
The default values of o.y and p.y are 0. They are actually related to the number of permutations (num_perm): o.y is above 0.2 * num_perm, and p.y is below 0.2 * num_perm. If non-default values are used, the values become absolute y coordinates.
1 2 3 4 5 6 | # simple example, use the vectors of ld difference values obtained from StrDif
strs1.vec <- c("ABCDdefABCDa", "def123DC", "123aABCD", "ACD13", "AC1ABC", "3123fe")
strs2.vec <- c("xYZdkfAxDa", "ef1563xy", "BC9Dzy35X", "AkeC1fxz", "65CyAdC", "Dfy3f69k")
ld.dif.vec <- StrDif(strs1.vec, strs2.vec, num_perm = 500, p.x = 0.025)
HistDif(dif.vec = ld.dif.vec, obsDif = 0.00751, pvalue = 0.35600,
o.x = 0.025, p.x = 0.040, p.y = 75)
|
For the initial two groups of strings,
the average normalized between-group levenshtein Distance is: 0.85056
the average normalized within-group levenshtein Distance is: 0.84306
the difference in the average normalized levenshtein Distance between between-group and within-group is: 0.00751.
The p value of the permutation test is: 0.38400
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.