在 sna 中使用节点参数作为中心性指标
Using the nodes argument for centrality metrics in sna
我正在尝试使用 statnet
计算图中特定节点的中心度指标(我不能只使用 igraph
,因为它没有我想要的某些指标) .
如何使用这些函数的节点参数来指定它?例如,取 prestige
# use the faux.magnolia.high dataset from ergm (1461 vertices and 974 edges)
library("ergm")
data(“faux.magnolia.high”)
# Try calculating for node 1
sna::prestige(faux.magnolia.high, nodes = 1, gmode = "graph")
1
# Try calculating for node 2
sna::prestige(faux.magnolia.high, nodes = 2, gmode = "graph")
NA
看起来这是 prestige
的 degree-related 版本中的错误。这将起作用,但计算将在整个图表上完成:
sna::prestige(faux.magnolia.high, gmode = "graph")[2]
在 statnet 邮件列表中查看 Skye 的完整回复:
http://mailman13.u.washington.edu/pipermail/statnet_help/2016/002175.html
我正在尝试使用 statnet
计算图中特定节点的中心度指标(我不能只使用 igraph
,因为它没有我想要的某些指标) .
如何使用这些函数的节点参数来指定它?例如,取 prestige
# use the faux.magnolia.high dataset from ergm (1461 vertices and 974 edges)
library("ergm")
data(“faux.magnolia.high”)
# Try calculating for node 1
sna::prestige(faux.magnolia.high, nodes = 1, gmode = "graph")
1
# Try calculating for node 2
sna::prestige(faux.magnolia.high, nodes = 2, gmode = "graph")
NA
看起来这是 prestige
的 degree-related 版本中的错误。这将起作用,但计算将在整个图表上完成:
sna::prestige(faux.magnolia.high, gmode = "graph")[2]
在 statnet 邮件列表中查看 Skye 的完整回复: http://mailman13.u.washington.edu/pipermail/statnet_help/2016/002175.html