# load the Florentine marriage network
data(florentine)
y <- flomarriage
# Competing models:
formulae <- c(y ~ edges + kstar(2),
y ~ edges + gwdegree(log(2),fixed=TRUE))
# Model selection via auto-RJ exchange algorithm
flo <- bergmS(formulae,
iters=1500,
aux.iters=500,
main.iters=rep(100,2),
burn.in=rep(50,2),
gammas=c(1,1.2))
# MCMC diagnostics
flo.out <- bergmS.output(flo)
Run the code above in your browser using DataLab