help sdhamming

Title

sdhamming -- Calculate inter-sequence distances using Hamming distance

Syntax

sdhamming varlist , options [option]

options

Cost structure
subsmat(matname) use matname as the substitution cost matrix

Distances
pwdist(matname) store the pairwise distances in matname, as a symmetric matrix. Will be created or overwritten.

Description

sdhamming calculates Hamming distances between all pairs
of sequences in the data, where varlist is a consecutive set
of variables describing the elements of the sequence. Hamming
distances compare sequences element by element such that the
inter-sequence distance is the sum of the element-wise distances.
The element-wise distances are given in the subsmat()
substitution matrix.

States must be numbered as consecutive integers from 1 up, and the
substitution cost matrix must be square, with dimension equal to the
number of states. States must not be missing.

Author

Brendan Halpin, brendan.halpin@ul.ie

Examples

. matrix scost = (0,1,2,3\1,0,1,2\2,1,0,1\3,2,1,0)

. sdhamming mon1-mon36, subsmat(scost) pwdist(dist)

. matrix list dist

. sdhamming mon1-mon72, subsmat(scost) pwdist(dist)

. matrix list dist