pathdist {lazy.mat}R Documentation

Calculation of Path Distance


Calculation of Path Distance


pathdist(S, minS = 1, sort = 2, navalue = 1.5, dump = 0, print = 1, debug = 0)



Input path matrix
S[i,j] >= minS means that member i is connected to member j.
( Member i talks to member j. Asymmetric relationship.)
Default value of the diagonal elements are 1.


The smallest value of S matrix which indicates connection.
Default value is 1.


= 0 not to sort the result
= 1 to sort the result descendingly by the block size.


A constant to be used to calculate Robinsonian form.
Change this when the Robinson matrix seems strange.


= 1 to output the # of paths of length L, L=2,3,... .


= 1 to print result


= 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


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)

[Package lazy.mat version 0.1.3 Index]