generate_proximities: Generate a Proximity Matrix

Description Usage Arguments See Also Examples

View source: R/proximity.R

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 node i to node j.

'oppv'

Optimal Probabilistic Path Value. Entry i,j of the proximity matrix will equal the optimal 'ppv' among all paths connecting node i to node j.

'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 node i to node j.

Usage

1
2
3
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 'ogpv', 'oppv', or 'sconductivity'

p

if mode is 'ogpv', determines 'p-norm' parameter for generalized path value calculation.

node_costs

if mode is 'ogpv', assigns transmission costs to vertices within the sociomatrix.

odds_scale

if mode is 'oppv', sets a global transfer odds scale for probabilistic path value calculation.

odds_scale_by_node

if mode is 'oppv', sets a transfer odds scale for each node in a probabilistic path value calculation.

See Also

gpv, ppv

Examples

1
2
3
4
5
6
7
8
9
## 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")

gretel documentation built on Aug. 22, 2019, 5:10 p.m.