# load the Florentine marriage network
# (included with the ergm package)
data(florentine)
# Estimation of a 3-dimensional model
# measuring the propensity to form 2-stars
# popMCMC with snooker update is used
# (this will take around 4 minutes)
flo <- bergm(flomarriage~edges+kstar(2),
main.iter=5000)
# MCMC diagnostics for the overall posterior
# and second chain
mcmc.output(flo,lags=200,chain=3)
# Bayesian goodness-of-fit test
bgof(flo,lags=150,n.sim=100,n.deg=10,n.dist=9,n.esp=6)Run the code above in your browser using DataLab