plot.mmsbm: Various visualization tools for 'mmsbm' objects

View source: R/plot.mmsbm.R

plot.mmsbmR Documentation

Various visualization tools for 'mmsbm' objects

Description

The function provides a variety of plotting options for a fitted mmsbm object.

Usage

## S3 method for class 'mmsbm'
plot(x, type = "groups", FX = NULL, node = NULL, ...)

Arguments

x

An object of class mmsbm, a result of a call to mmsbm.

type

character string denoting the type of plot. The default, "groups," plots the estimated matrix of group by group edge formation probabilities as a network plot, with nodes representing groups (sized proportional to relative membership) and edge colors encoding probability of between-group ties. "blockmodel" plots the same information, but using a tile plot instead of a network plot. "membership" plots average membership in each latent group by time period. "effect" provides a series of plots showing the estimated effect of a shfit in monadic covariate values.

FX

with type == "effect"; a list resulting from a call to covFX.

node

with type == "membership"; a character string specifying the node for which group membership should be plotted.

...

Currently ignored

Value

The requested plot object.

Author(s)

Santiago Olivella (olivella@unc.edu), Adeline Lo (aaylo@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
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))

## Plot blockmodel as network
plot(lazega_mmsbm)


NetMix documentation built on May 29, 2024, 6:39 a.m.