vcov.mmsbm: Extract Variance-Covariance Matrix for a Fitted 'mmsbm'...

View source: R/vcov.mmsbm.R

vcov.mmsbmR Documentation

Extract Variance-Covariance Matrix for a Fitted mmsbm Object

Description

Extract Variance-Covariance Matrix for a Fitted mmsbm Object

Usage

## S3 method for class 'mmsbm'
vcov(object, param = "All", ...)

Arguments

object

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

param

Character string, which set of parameters should the vcov be extracted for? One of "MonadCoef", "DyadCoef", "BlockModel" or "All" (the default).

...

Currently ignored

Value

For param="All", named list of individual return components. For all other values of param, a numeric covariance matrix.

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
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,
                                           se_sim = 2)) # Usually requires more samples.

vcov(lazega_mmsbm, "MonadCoef")


NetMix documentation built on Nov. 16, 2022, 5:15 p.m.