multibergm: Fit multibergm to multiple networks

View source: R/multibergm.R

multibergmR Documentation

Fit multibergm to multiple networks

Description

Main function to fit a hierarchical framework of Bayesian exponential random graph models to a population of networks. Each network i is modelled as an ERGM with network-level parameters \theta_i, each of which come from a common group- or population-level distribution. An exchange-within-Gibbs algorithm is used to generate samples from the joint posterior. The group memberships, priors, and other model fitting hyperparameters are set through the control_multibergm function.

Usage

multibergm(object, ...)

## S3 method for class 'formula'
multibergm(
  object,
  model_formula = ~1,
  constraints = ~.,
  main_iters = 1000L,
  model_matrix = get_model_matrix(object, model_formula),
  control = control_multibergm(object, model_matrix, constraints),
  prior = set_priors(object, model_matrix, control),
  init = set_init(object, prior, model_matrix),
  ...
)

## S3 method for class 'multibergm'
multibergm(object, main_iters = 1000, ...)

Arguments

object

A multibergm object, or a R formula object, of the form y ~ <model terms>, where y is a network object or a network.list object.

...

Arguments to be passed to methods.

constraints

A one-sided formula specifying one or more constraints on the support of the distribution of the networks being simulated.

main_iters

Number of (outer) MCMC iterations

control

A list of parameters set by control_multibergm

prior

A list of explicit prior specifications.

init

A list of initial values.

groups

A vector of group memberships

Value

A list containing the following elements:

  • networks - to which the model was fit

  • ergm_formula - specifying the ERGM

  • model_formula - specifying the linear model relating network covariates to ERGM summary statistics

  • constraints - used to fix any summary statistics

  • main_iters - the number of MCMC iterations used

  • control parameters used to fit the model

  • params - list containing MCMC output for each variable

  • accepts - list containing acceptance counts at each iteration

Methods (by class)

  • formula: S3 method for class 'formula'

  • multibergm: S3 method for class 'multibergm', used to continue generating posterior samples from a previous fit


brieuclehmann/multibergm documentation built on June 19, 2024, 6:36 p.m.