transitivity {Perc} | R Documentation |
calculate transitivity measurements for a matrix
Description
transitivity
calculate transitivity measurements for a matrix
Usage
transitivity(conf, strict = FALSE)
Arguments
conf |
an N-by-N conflict matrix whose |
strict |
a logical vector of length 1 (TRUE or FALSE). It is used in transitivity definition for alpha estimation. It should be set to TRUE when a transitive triangle is defined as all pathways in the triangle go to the same direction; it should be set to FALSE when a transitive triangle is defined as PRIMARY pathways in the triangle go to the same direction. Strict = FALSE by default. |
Details
transitivity
is calculated as the proportion transitive triangles in the total of transitive and intransitive triangles.
transitivity is used to estimate alpha, which is used in turn in imputing information from indirect pathways as to what degree we can trust information from indirect pathways.
Greater transitivity is associated with assigning higher weight to information from indirect pathways.
Value
A list of four elements.
transitive |
The number of transitive triangles. |
intransitive |
The number of intransitive triangles. |
transitivity |
transitivity, the proportion of transitive triangles. |
alpha |
The value of alpha corresponding to this value of transitivity. |
See Also
countPaths
, findIDpaths
, conductance
Examples
# convert an edgelist to conflict matrix
confmatrix <- as.conflictmat(sampleEdgelist)
# transitivity calculation
conftrans <- transitivity(confmatrix, strict = FALSE)
conftrans$transitive
conftrans$intransitive
conftrans$transitivity
conftrans$alpha