Learn R Programming

Bergm (version 1.0)

mcmc.output: MCMC output diagnostics

Description

This function returns the posterior density estimates and creates simple diagnostic plots for the MCMC produced from a fit.

Usage

mcmc.output(out, lags = 100, chain = 1, save = FALSE)

Arguments

out
bergm output
lags
count; number of lags for the autocorrelation plots
chain
count; used to plot the MCMC output for the selected chain
save
logical; if TRUE a file called "mcmc.output.out" is saved in the working directory

Examples

Run this code
data(florentine)

flo2 <- bergm(flobusiness~edges+kstar(2),main.iter=8000,           popMCMC=TRUE,sdprior=50,block.iter=1000,sdgamma=1)

## MCMC output diagnostics for the second chain

mcmc.output(flo2,lags=150,chain=2)

Run the code above in your browser using DataLab