Description Usage Arguments Details See Also Examples
Calculates the generalized path value of a user-specified path through
sociomatrix
. Parameter p
sets the p-norm used in calculation.
1 |
sociomatrix |
a nonnegative, real valued sociomatrix. |
path |
an integer vector of node indices from |
p |
a nonnegative real number that sets the 'p-norm' parameter for generalized path value calculation. |
node_costs |
a list of costs, in order, of all nodes represented in the sociomatrix, all are assumed 0 if unspecified |
As a rule of thumb, p close to 0 will downweight the impact of particular
tie strengths and upweight the impact of binary path length. p equal to
infinity will recapitulate the traditional path value measure of Peay (1980)
and is therefore the default. In other words, the value of a path under
p = Inf
will be the value of the weakest tie. The value of the same
path under p = 0
will be the inverse of its binary length.
opt_gpv
to identify the path of optimal 'gpv' between two nodes
and all_opt_gpv
to identify the optimal paths between all pairs of
nodes. Calling generate_proximities
with mode = 'gpv'
returns a matrix 'gpv' values for the optimal paths between all pairs of
nodes.
1 2 3 4 5 6 7 8 | ## Calculate gpv along a path in a sociomatrix
gpv(YangKnoke01, path = c(1,2,5), p = 1)
## The same calculation, with nonzero node costs
gpv(YangKnoke01, path = c(1,2,5), p = 1, node_costs = c(1,3,3,2,1))
## This path doesn't exist
gpv(YangKnoke01, path = c(1,2,4,5), p = 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.