pathdist {lazy.mat} | R Documentation |
Calculation of Path Distance
pathdist(S, minS = 1, sort = 2, navalue = 1.5, dump = 0, print = 1, debug = 0)
S |
Input path matrix |
minS |
The smallest value of S matrix which indicates connection. |
sort |
= 0 not to sort the result |
navalue |
A constant to be used to calculate Robinsonian form. |
dump |
= 1 to output the # of paths of length L, L=2,3,... . |
print |
= 1 to print result |
debug |
= 1 to print intermediate result |
S ns x ns input path matrix
D ns x ns minimum path distance from i to j.
D[i,j]=L member i can reach member j via L-1 menbers.
D[i,j]=NA means no conection.
C ns x ns connection from i to j
C[i,j]=1 means i and j are connected, C[i,j]=0 means no connection.
SS ns x ns sorted input path matrix
DD ns x ns sorted minimum path dist from i to j
CC ns x ns sorted connection from i to j
nblk 1 x 1 # of blocks
sblk nblk x 1 # of members in each block
sort 1 x 1 sort parameter
od ns x 1 new order of original row/col
that is, to sort, use SS = S[order, order]
error 1 x 1 = 0 if the connection matrix can be block diagonalized.
V An array of the V[,,L] matrices
set.seed(1701) n <- 8 S <- sample( c(0,0,0,0,0,1), n*(n-1)/2, replace=1 ) S <- vechinv(S,nodiag=1) res <- pathdist(S, print=2, dump=1)