Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mcmc.diagnostics.stergm

Conduct MCMC diagnostics on an ergm or stergm fit


Description

This function prints diagnistic information and creates simple diagnostic plots for the MCMC sampled statistics produced from a stergm fit.

Usage

## S3 method for class 'stergm'
mcmc.diagnostics(object, center = TRUE, esteq = TRUE, vars.per.page = 3, ...)

Arguments

object

A stergm object. See documentation for stergm.

center

Logical: If TRUE, ; center the samples on the observed statistics.

esteq

Logical: If TRUE, summarize the estimating equation values (evaluated at the MLE of any non-linear parameters), rather than their canonical components.

vars.per.page

Number of rows (one variable per row) per plotting page. Ignored if latticeExtra package is not installed.

...

Additional arguments, to be passed to plotting functions.

Details

The plots produced are a trace of the sampled output and a density estimate for each variable in the chain. The diagnostics printed include correlations and convergence diagnostics.

In fact, an object contains the matrix of statistics from the MCMC run as component $sample. This matrix is actually an object of class mcmc and can be used directly in the coda package to assess MCMC convergence. Hence all MCMC diagnostic methods available in coda are available directly. See the examples and https://www.mrc-bsu.cam.ac.uk/software/bugs/the-bugs-project-winbugs/coda-readme/.

More information can be found by looking at the documentation of stergm.

Value

mcmc.diagnostics.ergm returns some degeneracy information, if it is included in the original object. The function is mainly used for its side effect, which is to produce plots and summary output based on those plots.

References

Raftery, A.E. and Lewis, S.M. (1995). The number of iterations, convergence diagnostics and generic Metropolis algorithms. In Practical Markov Chain Monte Carlo (W.R. Gilks, D.J. Spiegelhalter and S. Richardson, eds.). London, U.K.: Chapman and Hall.

This function is based on the coda package It is based on the the R function raftery.diag in coda. raftery.diag, in turn, is based on the FORTRAN program gibbsit written by Steven Lewis which is available from the Statlib archive.

See Also

ergm, stergm,network package, coda package, summary.ergm


tergm

Fit, Simulate and Diagnose Models for Network Evolution Based on Exponential-Family Random Graph Models

v3.7.0
GPL-3 + file LICENSE
Authors
Pavel N. Krivitsky [aut, cre] (<https://orcid.org/0000-0002-9101-3362>), Mark S. Handcock [aut, ths], David R. Hunter [ctb], Steven M. Goodreau [ctb, ths], Martina Morris [ctb, ths], Nicole Bohme Carnegie [ctb], Carter T. Butts [ctb], Ayn Leslie-Cook [ctb], Skye Bender-deMoll [ctb], Li Wang [ctb], Kirk Li [ctb], Chad Klumb [ctb]
Initial release
2020-10-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.