Learn R Programming

Bergm (version 3.0.1)

abergm: Adaptive algorithms for Bayesian exponential random graph models

Description

Function to fit Bayesian exponential random graphs models using adaptive exchange algorithms.

Usage

abergm(formula, burn.in = 100, main.iters = 1000, aux.iters = 1000, m.prior = NULL, sigma.prior = NULL, nchains = NULL, gamma = 0.5, method = 'Adaptive.chains', rectangular = TRUE, sigma.epsilon = NULL, updategap = 10, ...)

Arguments

formula
formula; an R formula object, of the form ~ where is a network object and are ergm-terms.
burn.in
count; number of burn-in iterations at the beginning of an MCMC run. If population MCMC is performed, it refers to the number of burn-in iterations for every chain of the population.
main.iters
count; number of iterations for the MCMC chain(s) excluding burn-in. If population MCMC is performed, it refers to the number of iterations for every chain of the population.
aux.iters
count; number of auxiliary iterations used for network simulation.
m.prior
vector; mean of the multivariate Normal prior. By default set to a vector of 0's.
sigma.prior
variance/covariance matrix for the multivariate Normal prior. By default set to a diagonal matrix with every diagonal entry equal to 100.
nchains
count; number of chains of the population MCMC. By default set to twice the model dimension (number of model terms). If the model is one-dimensional, nchains is set to 1.
gamma
scalar; ``parallel ADS move factor.'' In case of one-dimensional models, the population MCMC procedure is disabled and gamma is used as variance of the Normal proposal distribution.
method
name of the adaptive strategy: ADS = adaptive direction sampling, Adaptive.past = adaptive strategy where past parameter particles are used, Adaptive.chains (default) = adaptive strategy all particles at the current time for all chains are used.
rectangular
logical; if Adaptive.past is used, it defines the type of adaptive strategy: if TRUE (default) = all parameter particles from all chains and all past simulations are used, if FALSE = all parameter particles along the same chain and all are used.
sigma.epsilon
variance/covariance matrix for the multivariate Normal proposal or ``parallel ADS move parameter''. By default set to a diagonal matrix with every diagonal entry equal to 0.0025. If the model is one-dimensional, sigma.espilon is set equal to gamma.
updategap
scalar; iteration interval used to update the variance/covariance matrix.
...
additional arguments, to be passed to lower-level functions.

See Also

bergm

Examples

Run this code
data(molecule)

mol <- abergm(molecule ~ edges + kstar(2),
              burn.in = 50,
              aux.iters = 50,
              main.iters = 500,
              method = 'Adaptive.chains',
              nchains = 4,
              gamma = 1)

Run the code above in your browser using DataLab