Learn R Programming

GMD (version 0.3.3)

gmdp: Generalized Minimum Distance between a pair of distributions

Description

Generalized Minimum Distance between a pair of distributions

Usage

gmdp(v1, v2, labels=c("v1","v2"), pseudocount=0, sliding=TRUE, resolution=1)
"print"(x, mode=c("brief","detailed","full"), digits=3, ...)
"summary"(object, ...)

Arguments

v1
a numeric vector, giving positional counts as a discrete distribution.
v2
a numeric vector, giving positional counts as a discrete distribution.
labels
a string vector of length 2, giving the names of v1 and v2 respectively.
pseudocount
a numeric value to be allocated for each position to reduce bias; by default pseudocount = 0.
sliding
logical, indicating whether sliding is allowed or not for an optimal solution; by default sliding = TRUE.
resolution
relative resolution, numeric (>=1), changing the size of the bin by multiplying the value. A larger value (lower resolution) is more computational efficiet but missing details.
x
an object of class gmdp.
object
an object of class gmdp.
mode
a string of the following: c("brief","detailed","full"), indicating whether to print in full mode (default).
digits
integer, indicating the number of decimal places to be printed.
...
arguments to be passed to method.

Value

gmdp returns an object of class gmdp, a numeric with an attribute of meta in a list with components:labels: a string vector, giving the names of distributionsv1.ori: a numeric vector, the first input distributionv2.ori: a numeric vector, the second input distributionv1: a numeric vector, the normalized version of the first input distributionv2: a numeric vector, the normalized version of the second input distributiondistance: numeric, the GM-Distance (GMD)sliding: logical, indicating whether sliding is performedpseudocount: a numeric value that is allocated at each position in addition to original valuesgap.pair: a numeric matrix, giving one gap pair per row: i.e. relative shifts between distributions of one optimal hitn.hit: numeric, the number of (equally good) optimal hits

Details

Generalized Minimum Distance between a pair of distributions

References

See citation("GMD")

See Also

print.gmdp, summary.gmdp, plot.gmdp gmdm

Examples

Run this code
require(GMD)
gmdp(c(4,1,1,0,0,0,3,1),c(2,1,1,0,0,0,3,3),sliding=FALSE)
x <- gmdp(c(4,1,1,0,0,0,3,1), c(1,1,2,1,1,0,0,0,3,3,5,5),
pseudocount=1, sliding=TRUE)
print(x)
print(x, "full")

Run the code above in your browser using DataLab