## S3 method for class 'ergm':
mcmc.diagnostics(object,
center=TRUE,
esteq=TRUE,
vars.per.page=3,
\dots)
## S3 method for class 'mcmc.list.ergm':
plot(x,
main = NULL,
vars.per.page = 3,
\dots)
ergm
.latticeExtra
package is not installed.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.gof(object, GOF=~model)
.
In fact, an ergm output 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
More information can be found by looking at the documentation of
ergm
.
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.
ergm
, network
package,
coda
package,
summary.ergm
#
data(florentine)
#
# test the mcmc.diagnostics function
#
gest <- ergm(flomarriage ~ edges + kstar(2))
summary(gest)
#
# Plot the probabilities first
#
mcmc.diagnostics(gest)
#
# Use coda directly
#
library(coda)
#
plot(gest$sample, ask=FALSE)
#
# A full range of diagnostics is available
# using codamenu()
#
Run the code above in your browser using DataLab