diff --git a/day3_files/Tutorial_SBM_Application.qmd b/day3_files/Tutorial_SBM_Application.qmd index 0e7354a..d10943c 100644 --- a/day3_files/Tutorial_SBM_Application.qmd +++ b/day3_files/Tutorial_SBM_Application.qmd @@ -312,15 +312,12 @@ df <- print_cluster(myBipartiteSBM$memberships$fungis, fungusTreeNetwork$fungus_ knitr::kable(df, caption = "Fungi clusters") ``` -# 6. To go further - - -Consider your preferred foodweb or plant-pollinator network (or the one from Day 2). Apply the sbm inference and compare the clusters to the ones introduced on Day 2. - +# 6. To go further +Consider your preferred foodweb or plant-pollinator network (or the one from Day 2). Apply the sbm inference and compare the clusters to the ones introduced on Day 2. ```{r trophic} -``` +``` # References diff --git a/day3_files/Tutorial_SBM_principle.html b/day3_files/Tutorial_SBM_principle.html index e954821..37ff7b3 100644 --- a/day3_files/Tutorial_SBM_principle.html +++ b/day3_files/Tutorial_SBM_principle.html @@ -4466,11 +4466,11 @@

#> * R6 and S3 methods #> $rNetwork, $rMemberships, $rEdges, plot, print, coef str(mySimNet$networkData) -#> int [1:100, 1:100] NA 1 1 0 0 0 0 1 0 0 ... +#> int [1:100, 1:100] NA 0 0 0 0 1 0 1 0 1 ... table(mySimNet$memberships)/nbNodes #> #> 1 2 3 -#> 0.30 0.45 0.25 +#> 0.33 0.41 0.26 @@ -4486,7 +4486,7 @@

1.2.a Ad dimLabels = list(row = "species", col = "species"), plotOptions = plotOptions)
-

+

@@ -4522,7 +4522,7 @@

1.2.a Ad dimLabels = list(row = "species", col = "species"), plotOptions = plotOptions)

-

+

- - - - - - \ No newline at end of file diff --git a/day4_files/TutorialDattilo.qmd b/day4_files/TutorialDattilo.qmd deleted file mode 100644 index be3a9a0..0000000 --- a/day4_files/TutorialDattilo.qmd +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: "Tutorial on Multipartite block models" -subtitle: "April 2024" -author: "Econet group" -date: "04/24/2024" -output: - rmarkdown::html_vignette: - toc: true -toc_depth: 4 -bibliography: references.bib -link-citations: true -editor: - markdown: - wrap: sentence ---- - -```{r, include = FALSE} -knitr::opts_chunk$set( -collapse = TRUE, -comment = "#>" -) -``` - - - - -# 0.Requirements - -This tutorial illustrates the use of block models for the analysis of (ecological) multipartite network. -Is is mainly based on a [vignette](https://grosssbm.github.io/sbm/articles/Multipartite_EcologicalNetwork.html) of the package `sbm` . -The package is on the CRAN. Its development version is on [Github](https://github.com/GrossSBM/sbm). It as been installed earlier during the week. - -```{r install, message=FALSE, warning=FALSE, eval=FALSE, echo = TRUE} -install.packages("sbm") -``` - - - - -```{r setup, message=FALSE, warning=FALSE} -library(sbm) -library(ggplot2) -``` - -# 1. What if I have more than 2 types of nodes? - -The sbm package is able to handle multipartite networks, meaning that they involve more that two types of nodes and intra and inter groups connections. -We analyse the data from @Dattilo with the method proposed by @multipartite. - -```{r } -data(multipartiteEcologicalNetwork) -Net <- multipartiteEcologicalNetwork -type = "bipartite" -model = "bernoulli" -directed = FALSE -PlantFlovis <- defineSBM(Net$Inc_plant_flovis, model, type, directed, dimLabels = c("Plants", - "Flovis")) -PlantAnt <- defineSBM(Net$Inc_plant_ant, model, type, directed, dimLabels = c("Plants", - "Ants")) -PlantBird <- defineSBM(Net$Inc_plant_bird, model, type, directed, dimLabels = c("Plants", - "Birds")) -plotMyMultipartiteMatrix(list(PlantFlovis, PlantAnt, PlantBird)) -``` - -We can also find block of species -```{r } -data(multipartiteEcologicalNetwork) -estimOptions = list(initBM = FALSE) -listSBM <- list(PlantFlovis, PlantAnt, PlantBird) -myMSBM <- estimateMultipartiteSBM(listSBM, estimOptions) -``` - -```{r } -plot(myMSBM) -``` - -These options are not included in the Shiny application yet. - -## References diff --git a/day4_files/day4_TutorialMultilayer.html b/day4_files/day4_TutorialMultilayer.html new file mode 100644 index 0000000..97b5dc7 --- /dev/null +++ b/day4_files/day4_TutorialMultilayer.html @@ -0,0 +1,4833 @@ + + + + + + + + + + + +📊 Block models for Multilayer networks + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+

📊 Block models for Multilayer networks

+

Tutorial based on the sbm package

+
+ + + +
+ +
+
Author
+
+

Sophie Donnet for the Econet group

+
+
+ +
+
Published
+
+

April 1, 2026

+
+
+ + +
+ + +
+ +

This tutorial illustrates the use of the block models on multilayer networks.

+
+

0. Requirements

+

The only package required for the analysis is sbm.

+
+
library(sbm)
+
+
+
+

1. From bipartite to multipartite network

+

First, we consider a Plant🌱-Ant🐜-Pollinator🐝 -Bird🦜 network which can be seen as a multipartite network, as defined in the course.

+
+

1.A Dattilo dataset

+

The dataset –compiled and conducted by Dáttilo et al. (2016) at Centro de Investigaciones Costeras La Mancha (CICOLMA), located on the central coast of the Gulf of Mexico, Veracruz, Mexico– involves three general types of plant-animal mutualistic interaction: pollination, seed dispersal by frugivorous birds, and protective mutualisms between ants and plants with extrafloral nectaries.

+

The dataset –which is one of the largest compiled so far with respect to species richness, number of interactions and sampling effort– includes 4 functional groups (FG), namely plants, pollinator species (referred as floral visitors), ant species and frugivorous bird species. Three binary bipartite networks have been collected representing interactions between

+
    +
  • 1/ plants and florals visitor, 🌱 - 🐝
  • +
  • 2/ plants and ants, 🌱 - 🐜
  • +
  • 3/ plants and seed dispersal birds 🌱 - 🦜
  • +
+

resulting into three bipartite networks.

+

The FG are of respective sizes: \(n_1 = 141\) plant 🌱 species, \(n_2 = 173\) pollinator 🐝 species, \(n_3 = 46\) frugivorous bird 🦜 species and \(n_4 = 30\) ant 🐜 species.

+

The 3 networks contain \(753\) observed interactions of which \(55\%\) are plant-pollinator 🌱 - 🐝 interactions, \(17\%\) are plant-birds 🌱 - 🦜 interactions and \(28\%\) are plant-ant 🌱 - 🐜 interactions.

+
+
data(multipartiteEcologicalNetwork)
+str(multipartiteEcologicalNetwork)
+#> List of 3
+#>  $ Inc_plant_ant   : int [1:141, 1:30] 0 1 0 0 1 0 1 0 1 0 ...
+#>   ..- attr(*, "dimnames")=List of 2
+#>   .. ..$ : chr [1:141] "Acacia_cornigera" "Acacia_macracantha" "Achatocarpus_nigricans" "Agave_angustifolia" ...
+#>   .. ..$ : chr [1:30] "Camponotus_planatus" "Camponotus_mucronatus" "Paratrechina_longicornis_" "Crematogaster_brevispinosa" ...
+#>  $ Inc_plant_bird  : int [1:141, 1:46] 0 0 1 0 0 0 0 0 0 0 ...
+#>   ..- attr(*, "dimnames")=List of 2
+#>   .. ..$ : chr [1:141] "Acacia_cornigera" "Acacia_macracantha" "Achatocarpus_nigricans" "Agave_angustifolia" ...
+#>   .. ..$ : chr [1:46] "Cyanocorax_morio" "Tyrannus_forficatus" "Ortalis_vetula" "Myiozetetes_similis" ...
+#>  $ Inc_plant_flovis: int [1:141, 1:173] 0 0 0 0 0 0 0 1 1 0 ...
+#>   ..- attr(*, "dimnames")=List of 2
+#>   .. ..$ : chr [1:141] "Acacia_cornigera" "Acacia_macracantha" "Achatocarpus_nigricans" "Agave_angustifolia" ...
+#>   .. ..$ : chr [1:173] "Apis_melifera" "Lasioglossum_sp1" "Trigona_nigra" "Ascia_monuste" ...
+names(multipartiteEcologicalNetwork)
+#> [1] "Inc_plant_ant"    "Inc_plant_bird"   "Inc_plant_flovis"
+Net <- multipartiteEcologicalNetwork
+
+
+
+

1.B Inference of multipartite network

+
+

From bipartite to multipartite

+

As seen on Day 3, we could look for blocks of plants when they are interacting with ants, birds and pollinators separately and “compare” the blocks of plants?

+
+
+Code +
res_biSBM_plant_bird <- estimateBipartiteSBM(Net$Inc_plant_bird)
+res_biSBM_plant_pollinator <- estimateBipartiteSBM(Net$Inc_plant_flovis)
+res_biSBM_plant_ant <- estimateBipartiteSBM(Net$Inc_plant_ant)
+
+
+

However, plants are in interactions with all of them, so we would like to consider all the interactions at the same time.

+
+
+

Formatting the data

+

We format the data to be able to use our functions i.e. we transform the matrices into an list containing

+
    +
  • the matrix itself,
  • +
  • ‘model’: the distribution you want to fit on the network
  • +
  • ‘type’ : simple for simple network, “bipartite” if it is bipartite (it can be deduces from the size of the matrix)
  • +
  • ‘dimLabels’: the name of functional group in row and the name of functional group in column.
  • +
+

The three created objects are gathered in a list.

+

To do so, we use the function defineNetwork.

+
+
type = "bipartite"
+model = "bernoulli"
+PlantFlovis <- defineSBM(netMat=Net$Inc_plant_flovis, model=model, dimLabels = c("Plants",
+    "Flovis"))
+PlantAnt <- defineSBM(netMat=Net$Inc_plant_ant, model=model, dimLabels = c("Plants",
+    "Ants"))
+PlantBird <- defineSBM(netMat = Net$Inc_plant_bird, model = model, dimLabels = c("Plants",
+    "Birds"))
+
+
+
+
+ +
+
+Note +
+
+
+

To make it work, you must be sure to have exactly the same set of plants (in the same order) in each matrix. The dimLabels arguments specifies which group is in row or columns in the matrices you provide.

+
+
+
+
+
+ +
+
+Tip +
+
+
+

If one wants to keep a track of the names of the species, they should be used as rownames and colnames in the matrices.

+
+
+
+
PlantFlovis$networkData[1:2, 1:2]
+#>                    Apis_melifera Lasioglossum_sp1
+#> Acacia_cornigera               0                1
+#> Acacia_macracantha             0                0
+
+

A plot of the data can be obtained with following command.

+
+
plotMyMultipartiteMatrix(list(PlantFlovis, PlantAnt, PlantBird))
+
+

+
+
+
+
+

Finding clusters in the 3 networks jointly

+

We are now ready to find block of species (based on Bar-Hen, Barbillon, and Donnet (2022)).

+
+
data(multipartiteEcologicalNetwork)
+estimOptions = list(initBM = FALSE)
+listSBM <- list(PlantFlovis, PlantAnt, PlantBird)
+res_MSBM_dattilo <- estimateMultipartiteSBM(listSBM, estimOptions)
+
+

As yesterday, we can plot the results.

+
+
plot(res_MSBM_dattilo) 
+
+

+
+
+
+
plot(res_MSBM_dattilo, type = "expected")
+
+

+
+
+
+
+
+
+

2. Multiplex networks

+

Assume that you have two (or more) networks involving the same species, but representing different interactions. For instance

+
    +
  • Observations at different times (on the year, of the day or along time)
  • +
  • Different types of interactions : mutualistic and co-occurrence.
  • +
+

These networks can be bipartite or simple. We provide here a synthetic dataset, maybe you have one in mind.

+
+
load(file='synthetic_multiplex.rda')
+dim(X1)
+#> [1]  70 150
+dim(X2)
+#> [1]  70 150
+
+

We provide a function to plot such a multiplex data. First the data must be formatted.

+
+
SBM1 <-defineSBM(netMat = X1,model = "bernoulli",dimLabels =c('plant','polli') )
+SBM2 <-defineSBM(netMat = X2,model = "bernoulli",dimLabels =c('plant','polli') )
+plotMyMultiplexMatrix(list(SBM1,SBM2))
+
+

+
+
+

The blocks can be discovered as follows.

+
+
res_Multiplex <- estimateMultiplexSBM(list(SBM1,SBM2), dependent = FALSE)
+
+
+
+
+ +
+
+Note +
+
+
+

The argument dependant = FALSE means that, conditionally on \(Z_i =k, W_j = \ell\), \(X^1_{ij}\) and \(X^2_{ij}\) are independent variables. As a consequent, the model is: \[\begin{eqnarray*} +Z_i &\sim& \mathcal{C}at_K(\pi_1,\dots, \pi_K)\\ +W_j &\sim& \mathcal{C}at_L(\rho_1,\dots, \rho_L)\\ +X^1_{ij} \sim Z_i=k, W_j = \ell&\sim & \mathcal{B}ern(\alpha^1_{k\ell})\\ +X^2_{ij}\sim Z_i=k, W_j = \ell&\sim & \mathcal{B}ern(\alpha^2_{k\ell}) +\end{eqnarray*}\] If you have two simple binary networks, you can relax the assumption of independence, relying on Barbillon et al. (2017).

+
+
+

You can plot the results as before by reordering the matrices

+
+
plot(res_Multiplex)
+plot(res_Multiplex,type='expected')
+
+
+ + +
+
+ +

References

+
+Barbillon, Pierre, Sophie Donnet, Emmanuel Lazega, and Avner Bar-Hen. 2017. Stochastic block models for multiplex networks: an application to a multilevel network of researchers.” Journal of the Royal Statistical Society Series A 180 (1): 295–314. https://ideas.repec.org/a/bla/jorssa/v180y2017i1p295-314.html. +
+
+Bar-Hen, Avner, Pierre Barbillon, and Sophie Donnet. 2022. “Block Models for Generalized Multipartite Networks: Applications in Ecology and Ethnobiology.” Statistical Modelling 22 (4): 273–96. https://doi.org/10.1177/1471082X20963254. +
+
+Dáttilo, Wesley, Nubia Lara-Rodrı́guez, Pedro Jordano, Paulo R. Guimarães, John N. Thompson, Robert J. Marquis, Lucas P. Medeiros, Raul Ortiz-Pulido, Maria A. Marcos-Garcı́a, and Victor Rico-Gray. 2016. “Unravelling Darwins Entangled Bank: Architecture and Robustness of Mutualistic Networks with Multiple Interaction Types.” Proceedings of the Royal Society of London B: Biological Sciences 283 (1843). +
+
+ + +
+ + + + + \ No newline at end of file diff --git a/day4_files/day4_TutorialMultilayer.qmd b/day4_files/day4_TutorialMultilayer.qmd new file mode 100644 index 0000000..bd8c3d2 --- /dev/null +++ b/day4_files/day4_TutorialMultilayer.qmd @@ -0,0 +1,206 @@ +--- +title: "📊 Block models for Multilayer networks" +subtitle: "Tutorial based on the sbm package" +author: "Sophie Donnet for the Econet group" +date: "April 2026" +format: + html: + theme: cosmo # moderne et clair + toc: true + toc-depth: 3 + code-fold: true # permet de replier les blocs de code + code-summary: "Show code" + secnumdepth: 2 + smooth-scroll: true + highlight-style: github + df-print: paged + embed-resources: true +editor: visual +bibliography: references.bib +--- + +```{r, include = FALSE} +knitr::opts_chunk$set( +collapse = TRUE, +comment = "#>" +) +``` + +This tutorial illustrates the use of the block models on multilayer networks. + +# 0. Requirements + +The only package required for the analysis is `sbm`. + +```{r setup, message=FALSE, warning=FALSE} +#| code-fold: false +library(sbm) + +``` + +# 1. From bipartite to multipartite network + +First, we consider a Plant🌱-Ant🐜-Pollinator🐝 -Bird🦜 network which can be seen as a multipartite network, as defined in the course. + +## 1.A Dattilo dataset + +The dataset --compiled and conducted by @Dattilo at Centro de Investigaciones Costeras La Mancha (CICOLMA), located on the central coast of the Gulf of Mexico, Veracruz, Mexico-- involves three general types of plant-animal mutualistic interaction: pollination, seed dispersal by frugivorous birds, and protective mutualisms between ants and plants with extrafloral nectaries. + +The dataset --which is one of the largest compiled so far with respect to species richness, number of interactions and sampling effort-- includes 4 functional groups (FG), namely plants, pollinator species (referred as floral visitors), ant species and frugivorous bird species. Three binary bipartite networks have been collected representing interactions between + +- 1/ plants and florals visitor, 🌱 - 🐝 +- 2/ plants and ants, 🌱 - 🐜 +- 3/ plants and seed dispersal birds 🌱 - 🦜 + +resulting into three bipartite networks. + +The FG are of respective sizes: $n_1 = 141$ plant 🌱 species, $n_2 = 173$ pollinator 🐝 species, $n_3 = 46$ frugivorous bird 🦜 species and $n_4 = 30$ ant 🐜 species. + +The 3 networks contain $753$ observed interactions of which $55\%$ are plant-pollinator 🌱 - 🐝 interactions, $17\%$ are plant-birds 🌱 - 🦜 interactions and $28\%$ are plant-ant 🌱 - 🐜 interactions. + +```{r loading dataset, eval=TRUE} +#| code-fold: false +data(multipartiteEcologicalNetwork) +str(multipartiteEcologicalNetwork) +names(multipartiteEcologicalNetwork) +Net <- multipartiteEcologicalNetwork +``` + +## 1.B Inference of multipartite network + +### From bipartite to multipartite + +As seen on Day 3, we could look for blocks of plants when they are interacting with ants, birds and pollinators separately and "compare" the blocks of plants? + +```{r bipartite, eval = FALSE, echo = TRUE} +res_biSBM_plant_bird <- estimateBipartiteSBM(Net$Inc_plant_bird) +res_biSBM_plant_pollinator <- estimateBipartiteSBM(Net$Inc_plant_flovis) +res_biSBM_plant_ant <- estimateBipartiteSBM(Net$Inc_plant_ant) +``` + +However, plants are in interactions with all of them, so we would like to consider all the interactions at the same time. + +### Formatting the data + +We format the data to be able to use our functions i.e. we transform the matrices into an list containing + +- *the matrix* itself, +- 'model': the distribution you want to fit on the network +- 'type' : `simple` for simple network, "bipartite" if it is bipartite (it can be deduces from the size of the matrix) +- 'dimLabels': the name of functional group in row and the name of functional group in column. + +The three created objects are gathered in a list. + +To do so, we use the function `defineNetwork`. + +```{r transform dataset, eval=TRUE} +#| code-fold: false +type = "bipartite" +model = "bernoulli" +PlantFlovis <- defineSBM(netMat=Net$Inc_plant_flovis, model=model, dimLabels = c("Plants", + "Flovis")) +PlantAnt <- defineSBM(netMat=Net$Inc_plant_ant, model=model, dimLabels = c("Plants", + "Ants")) +PlantBird <- defineSBM(netMat = Net$Inc_plant_bird, model = model, dimLabels = c("Plants", + "Birds")) +``` + +::: callout-note +To make it work, you must be sure to have exactly the same set of plants (in the same order) in each matrix. The `dimLabels` arguments specifies which group is in row or columns in the matrices you provide. +::: + +::: callout-tip +If one wants to keep a track of the names of the species, they should be used as rownames and colnames in the matrices. +::: + +```{r example of dataset, eval=TRUE} +#| code-fold: false +PlantFlovis$networkData[1:2, 1:2] +``` + +A plot of the data can be obtained with following command. + +```{r plot data} +#| code-fold: false +plotMyMultipartiteMatrix(list(PlantFlovis, PlantAnt, PlantBird)) +``` + +### Finding clusters in the 3 networks jointly + +We are now ready to find block of species (based on @multipartite). + +```{r eval = TRUE, echo = FALSE} +load('res_Multipartite_BM_Dattilo.rda') +``` + +```{r eval = FALSE, echo=TRUE} +#| code-fold: false +data(multipartiteEcologicalNetwork) +estimOptions = list(initBM = FALSE) +listSBM <- list(PlantFlovis, PlantAnt, PlantBird) +res_MSBM_dattilo <- estimateMultipartiteSBM(listSBM, estimOptions) +``` + +As yesterday, we can plot the results. + +```{r } +#| code-fold: false +plot(res_MSBM_dattilo) +``` + +```{r } +#| code-fold: false +plot(res_MSBM_dattilo, type = "expected") +``` + +# 2. Multiplex networks + +Assume that you have two (or more) networks involving the same species, but representing different interactions. For instance + +- Observations at different times (on the year, of the day or along time) +- Different types of interactions : mutualistic and co-occurrence. + +These networks can be bipartite or simple. We provide here a synthetic dataset, maybe you have one in mind. + +```{r synthetic data} +#| code-fold: false +load(file='synthetic_multiplex.rda') +dim(X1) +dim(X2) + +``` + +We provide a function to plot such a multiplex data. First the data must be formatted. + +```{r synthetic data plot} +#| code-fold: false +SBM1 <-defineSBM(netMat = X1,model = "bernoulli",dimLabels =c('plant','polli') ) +SBM2 <-defineSBM(netMat = X2,model = "bernoulli",dimLabels =c('plant','polli') ) +plotMyMultiplexMatrix(list(SBM1,SBM2)) +``` + +The blocks can be discovered as follows. + +```{r synthetic data estim, eval = FALSE} +#| code-fold: false +res_Multiplex <- estimateMultiplexSBM(list(SBM1,SBM2), dependent = FALSE) +``` + +::: callout-note +The argument `dependant = FALSE` means that, conditionally on $Z_i =k, W_j = \ell$, $X^1_{ij}$ and $X^2_{ij}$ are independent variables. As a consequent, the model is: \begin{eqnarray*} +Z_i &\sim& \mathcal{C}at_K(\pi_1,\dots, \pi_K)\\ +W_j &\sim& \mathcal{C}at_L(\rho_1,\dots, \rho_L)\\ +X^1_{ij} \sim Z_i=k, W_j = \ell&\sim & \mathcal{B}ern(\alpha^1_{k\ell})\\ +X^2_{ij}\sim Z_i=k, W_j = \ell&\sim & \mathcal{B}ern(\alpha^2_{k\ell}) +\end{eqnarray*} If you have two simple binary networks, you can relax the assumption of independence, relying on @multiplexSBM. +::: + +You can plot the results as before by reordering the matrices + +```{r, eval = FALSE, echo=TRUE} +#| code-fold: false +plot(res_Multiplex) +plot(res_Multiplex,type='expected') +``` + +## References diff --git a/day4_files/references.bib b/day4_files/references.bib new file mode 100644 index 0000000..d3c5a2d --- /dev/null +++ b/day4_files/references.bib @@ -0,0 +1,144 @@ +@article{tree_fungus_network, + title={Architecture of an antagonistic tree/fungus network: the asymmetric influence of past evolutionary history}, + author={Vacher, Corinne and Piou, Dominique and Desprez-Loustau, Marie-Laure}, + journal={PloS one}, + volume={3}, + number={3}, + pages={e1740}, + year={2008}, + publisher={Public Library of Science} +} + +@article{blockmodels, + title={Blockmodels: A R-package for estimating in Latent Block Model and Stochastic Block Model, with various probability functions, with or without covariates}, + author={Leger, Jean-Benoist}, + journal={arXiv preprint arXiv:1602.07587}, + year={2016} +} + + + +@inbook{AubertChap6, +author = { Aubert , Julie and Barbillon , Pierre and Donnet , Sophie and Miele , Vincent}, +publisher = {John Wiley & Sons, Ltd}, +isbn = {9781119902799}, +title = {Using Latent Block Models to Detect Structure in Ecological Networks}, +booktitle = {Statistical Approaches for Hidden Variables in Ecology}, +chapter = {6}, +pages = {117-134}, +doi = {https://doi.org/10.1002/9781119902799.ch6}, +url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/9781119902799.ch6}, +eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1002/9781119902799.ch6}, +year = {2022}, +keywords = {bipartite binary networks, ecological networks, food web, latent block models, plant–pollinator network, stochastic block models, unipartite binary networks}, +abstract = {Summary Stochastic block models (SBMs) have been extended for bipartite networks in the form of latent block models (LBM) or bipartite SBM, which is equivalent. This chapter presents SBMs for both unipartite and bipartite binary networks and illustrates their flexibility. It discusses the statistical inference of these models: in this way, starting with an observed network, a description of the relations between groups of nodes can be obtained along with the groups themselves. Ecological networks are made up of nodes, representing biological entities of interest and edges representing the interaction being studied. The chapter applies the SBM analytical method to two ecological networks: a food web and a plant–pollinator network. The SBM model offers a means of summarizing the complexity inherent in the observation of over a thousand interactions. Note that SBMs are a special case of probabilistic network models including latent variables.} +} + +@article{chabert2022, +author = {Saint-Clair Chabert-Liddell and Pierre Barbillon and Sophie Donnet}, +title = {{Learning common structures in a collection of networks. An application to food webs}}, +volume = {18}, +journal = {The Annals of Applied Statistics}, +number = {2}, +publisher = {Institute of Mathematical Statistics}, +pages = {1213 -- 1235}, +keywords = {clustering, ecology, latent variable models, networks, Stochastic block model}, +year = {2024}, +doi = {10.1214/23-AOAS1831}, +URL = {https://doi.org/10.1214/23-AOAS1831} +} + + + + + + + + + +@article{multipartite, +author = {Avner Bar-Hen and Pierre Barbillon and Sophie Donnet}, +title ={Block models for generalized multipartite networks: Applications in ecology and ethnobiology}, +journal = {Statistical Modelling}, +volume = {22}, +number = {4}, +pages = {273-296}, +year = {2022}, +doi = {10.1177/1471082X20963254}, +URL = {https://doi.org/10.1177/1471082X20963254} +} + + + +@Article{multiplexSBM, + author={Pierre Barbillon and Sophie Donnet and Emmanuel Lazega and Avner Bar-Hen}, + title={{Stochastic block models for multiplex networks: an application to a multilevel network of researchers}}, + journal={Journal of the Royal Statistical Society Series A}, + year=2017, + volume={180}, + number={1}, + pages={295-314}, + month={January}, + keywords={}, + doi={}, + abstract={No abstract is available for this item.}, + url={https://ideas.repec.org/a/bla/jorssa/v180y2017i1p295-314.html} +} + +@article{multiplexKefi, + doi = {10.1371/journal.pbio.1002527}, + author = {Kéfi, Sonia AND Miele, Vincent AND Wieters, Evie A. AND Navarrete, Sergio A. AND Berlow, Eric L.}, + journal = {PLOS Biology}, + publisher = {Public Library of Science}, + title = {How Structured Is the Entangled Bank? The Surprisingly Simple Organization of Multiplex Ecological Networks Leads to Increased Persistence and Resilience}, + year = {2016}, + month = {08}, + volume = {14}, + url = {https://doi.org/10.1371/journal.pbio.1002527}, + pages = {1-21}, + number = {8} +} + +@article{Dattilo, + author = {D{\'a}ttilo, Wesley and Lara-Rodr{\'\i}guez, Nubia and Jordano, Pedro and Guimar{\~a}es, Paulo R. and Thompson, John N. and Marquis, Robert J. and Medeiros, Lucas P. and Ortiz-Pulido, Raul and Marcos-Garc{\'\i}a, Maria A. and Rico-Gray, Victor}, + title = {Unravelling {D}arwin{\textquoteright}s entangled bank: architecture and robustness of mutualistic networks with multiple interaction types}, + volume = {283}, + number = {1843}, + year = {2016}, + OPTdoi = {10.1098/rspb.2016.1564}, + publisher = {The Royal Society}, + abstract = {Trying to unravel Darwin{\textquoteright}s entangled bank further, we describe the architecture of a network involving multiple forms of mutualism (pollination by animals, seed dispersal by birds and plant protection by ants) and evaluate whether this multi-network shows evidence of a structure that promotes robustness. We found that species differed strongly in their contributions to the organization of the multi-interaction network, and that only a few species contributed to the structuring of these patterns. Moreover, we observed that the multi-interaction networks did not enhance community robustness compared with each of the three independent mutualistic networks when analysed across a range of simulated scenarios of species extinction. By simulating the removal of highly interacting species, we observed that, overall, these species enhance network nestedness and robustness, but decrease modularity. We discuss how the organization of interlinked mutualistic networks may be essential for the maintenance of ecological communities, and therefore the long-term ecological and evolutionary dynamics of interactive, species-rich communities. We suggest that conserving these keystone mutualists and their interactions is crucial to the persistence of species-rich mutualistic assemblages, mainly because they support other species and shape the network organization.}, + issn = {0962-8452}, + OPTurl = {http://rspb.royalsocietypublishing.org/content/283/1843/20161564}, + OPTeprint = {http://rspb.royalsocietypublishing.org/content/283/1843/20161564.full.pdf}, + journal = {Proceedings of the Royal Society of London B: Biological Sciences} +} + +@book{sarkees2010resort, + title={Resort to war: a data guide to inter-state, extra-state, intra-state, and non-state wars, 1816-2007}, + author={Sarkees, Meredith Reid and Wayman, Frank Whelon}, + year={2010}, + publisher={Cq Pr} +} + +@book{gibler2008international, + title={International military alliances, 1648-2008}, + author={Gibler, Douglas M}, + year={2008}, + publisher={CQ Press} +} + +@article{thompson2003impacts, +author = {Thompson, R. M. and Townsend, C. R.}, +title = {IMPACTS ON STREAM FOOD WEBS OF NATIVE AND EXOTIC FOREST: AN INTERCONTINENTAL COMPARISON}, +journal = {Ecology}, +volume = {84}, +number = {1}, +pages = {145-161}, +keywords = {biogeography, exotic vs. native forests, food web, invasions, Maine (USA), New Zealand, North Carolina (USA), streams}, +doi = {https://doi.org/10.1890/0012-9658(2003)084[0145:IOSFWO]2.0.CO;2}, +url = {https://esajournals.onlinelibrary.wiley.com/doi/abs/10.1890/0012-9658%282003%29084%5B0145%3AIOSFWO%5D2.0.CO%3B2}, +year = {2003} +} + + diff --git a/day4_files/res_Multipartite_BM_Dattilo.rda b/day4_files/res_Multipartite_BM_Dattilo.rda new file mode 100644 index 0000000..0893218 Binary files /dev/null and b/day4_files/res_Multipartite_BM_Dattilo.rda differ diff --git a/day4_files/synthetic_multiplex.rda b/day4_files/synthetic_multiplex.rda new file mode 100644 index 0000000..73f4450 Binary files /dev/null and b/day4_files/synthetic_multiplex.rda differ