head.mmsbm {NetMix} | R Documentation |
Identify nodes with most frequent membership in latent groups
Description
The function lists the nodes (optionally, node-time periods) that most frequently instantiate membership in each latent group.
Usage
## S3 method for class 'mmsbm'
head(x, n = 6, t = NULL, node = TRUE, t.correct = FALSE, ...)
Arguments
x |
An object of class |
n |
Numeric or integer; specifies how many units will be identified for each group. |
t |
Optional vector of time periods to be used for assessing latent group membership. |
node |
Logical; indicates whether latent group memberships should be averaged at the node level. If FALSE, the function returns the node-time period units with highest estimated membership in each latent group. |
t.correct |
Logical; indicates whether latent group memberships should be corrected for temporal trends. If TRUE, the function returns the node-time period units with highest estimated membership in each latent group. |
... |
Currently ignored |
Value
List of length n.blocks
. Each entry contains a sorted vector of average latent membership probabilities of length n
.
Author(s)
Santiago Olivella (olivella@unc.edu), Adeline Lo (aylo@wisc.edu), Tyler Pratt (tyler.pratt@yale.edu), Kosuke Imai (imai@harvard.edu)
Examples
library(NetMix)
## Load datasets
data("lazega_dyadic")
data("lazega_monadic")
## Estimate model with 2 groups
set.seed(123)
lazega_mmsbm <- mmsbm(SocializeWith ~ Coworkers,
~ School + Practice + Status,
senderID = "Lawyer1",
receiverID = "Lawyer2",
nodeID = "Lawyer",
data.dyad = lazega_dyadic,
data.monad = lazega_monadic,
n.blocks = 2,
mmsbm.control = list(seed = 123,
conv_tol = 1e-2,
hessian = FALSE))
## Show top 6 lawyers in each estimated latent block
head(lazega_mmsbm)