The following uses a BIC estimate of *π(Y,\hat{X}|M)* to perform model selection. Note that this usage is not the typical BIC encountered in simpler contexts.

1 2 |

`object` |
A |

`...` |
optional additional arguments. None are used. |

Rather than estimating the integrated likelihood *π(Y|G)*, this instead incorporates the MAP estimates of the latent positions and corresponds to *π(Y,\hat{X}|M)*. The BIC value returned is the following sum:

*-2 log(π(Y|\hat{X},\hat{θ_1})) + dim(θ_1)log(∑ y_{ijt})
-2 log(π(\hat{X}|\hat{θ_2})) + dim(θ_2) \log(nT)*

. See Sewell and Chen (2016) for more details.

A scalar. Lower values are better.

Handcock, M. S., A.E. Raftery, and J. M. Tantrum (2007). Model-based clustering for social networks. J.R. Statist. Soc. A, 170, p. 301-354.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
## Not run:
dncObjs = list()
BICvals = numeric(9)
for(i in 2:10){
print(i)
dncObjs[[i]] <- dnc(friendship,M=i,p=3,method="VB",
controls=list(nDraws=500,burnin=100,
MaxItStg2=50,epsilonStg2=1e-15))
BICvals[i-1] <- BIC(dncObjs[[i]])
}
plot(BICvals~c(2:10),type="b",pch=16,
xlab="Number of communities",ylab="BIC value")
( MBest = which.min(BICvals)+1 )
abline(v=MBest,lty=2,col="blue")
## End(Not run)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.