generate_proximities {gretel} | R Documentation |
Generate a Proximity Matrix
Description
Generates a proximity matrix in one of three modes:
'ogpv'
Optimal Generalized Path Value. Entry
i,j
of the proximity matrix will equal the optimal 'gpv' among all paths connecting nodei
to nodej
.'oppv'
Optimal Probabilistic Path Value. Entry
i,j
of the proximity matrix will equal the optimal 'ppv' among all paths connecting nodei
to nodej
.'sconductivity'
Social Conductivity (Random Walk Probability). If each tie strength recorded in
sociomatrix
is taken to be analogous to the conductivity of an electrical component,i,j
of the proximity matrix will equal total conductivity of all paths from nodei
to nodej
.
Usage
generate_proximities(sociomatrix, mode = c("ogpv", "oppv",
"sconductivity"), p = Inf, node_costs = NULL, odds_scale = 1,
odds_scale_by_node = NULL)
Arguments
sociomatrix |
a nonnegative, real valued sociomatrix. |
mode |
a selection of |
p |
if |
node_costs |
if |
odds_scale |
if |
odds_scale_by_node |
if |
See Also
Examples
## Generate a proximity matrix in each mode
## Optimal Generalized Path Value
generate_proximities(YangKnoke01, mode = "ogpv", p = Inf, node_costs = c(1,3,3,2,1))
## Optimal Probabilistic Path Value
generate_proximities(YangKnoke01, mode = "oppv", odds_scale = 2)
## Sconductivity
generate_proximities(YangKnoke01, mode = "sconductivity")