head.mmsbm | R Documentation |
The function lists the nodes (optionally, node-time periods) that most frequently instantiate membership in each latent group.
## S3 method for class 'mmsbm'
head(x, n = 6, t = NULL, node = TRUE, t.correct = FALSE, ...)
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 |
List of length n.blocks
. Each entry contains a sorted vector of average latent membership probabilities of length n
.
Santiago Olivella (olivella@unc.edu), Adeline Lo (aylo@wisc.edu), Tyler Pratt (tyler.pratt@yale.edu), Kosuke Imai (imai@harvard.edu)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.