# NOT RUN {
data(foodwebWoodward)
## mandatory to use many nstart>>1 starting points
## but estimation can be long;
## better to use nb.cores>1 cores
list.dynsbm <- select.dynsbm(Y=foodwebWoodward$Y,
present=foodwebWoodward$present,
Qmin=1, Qmax=6, edge.type="binary",
directed=TRUE, self.loop=TRUE,
nstart=200, nb.cores=4)
## selection of Q=4 with the ICL method
dynsbm <- list.dynsbm[[4]]
## plotting intra/inter connectivity patterns
connectivity.plot(dynsbm, foodwebWoodward$Y)
## plotting switches between groups
alluvial.plot(dynsbm, timestep.abbrev="D", only.present=F)
# }
Run the code above in your browser using DataLab