View source: R/mcmc.diagnostics.ergmm.R
| mcmc.diagnostics.ergmm | R Documentation | 
This function creates simple diagnostic plots for the MCMC sampled statistics produced from a fit. It also prints the Raftery-Lewis diagnostics, indicates if they are sufficient, and suggests the run length required.
## S3 method for class 'ergmm'
mcmc.diagnostics(
  object,
  which.diags = c("cor", "acf", "trace", "raftery"),
  burnin = FALSE,
  which.vars = NULL,
  vertex.i = c(1),
  ...
)
object | 
 An object of class   | 
which.diags | 
 A list of diagnostics to produce. "cor" is the correlation matrix of the statistics, "acf" plots the autocorrelation functions, "trace" produces trace plots and density estimates, and "raftery" produces the Raftery-Lewis statistics.  | 
burnin | 
 If not   | 
which.vars | 
 A named list mapping variable names to the indices to include. If given, overrides the defaults and all arguments that follow.  | 
vertex.i | 
 A numeric vector of vertices whose latent space coordinates and random effects to include.  | 
... | 
 Additional arguments. None are supported at the moment.  | 
Produces the plots per which.diags.  Autocorrelation function that is
printed if "acf" is requested is for lags 0 and interval.
mcmc.diagnostics.ergmm returns a table of Raftery-Lewis
diagnostics.
ergmm, ergmm.object,
raftery.diag, autocorr,
plot.mcmc.list
#
data(sampson)
#
# test the mcmc.diagnostics function
#
gest <- ergmm(samplike ~ euclidean(d=2),
              control=ergmm.control(burnin=1000,interval=5))
summary(gest)
#
# Plot the traces and densities
#
mcmc.diagnostics(gest)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.