Source code for the app ERGMs for Brain Networks in Brainlife.io. This app estimates the parameters of an Exponential Random Graph Model (ERGM) on brain network data.
- Vito Dichio (vito.dichio@etu.sorbonne-universite.fr)
- Soichi Hayashi
Given a graph G and a set of sufficient statistics
the goal of an ERGM fit is to estimate the parameters
The current app is based on the ergm package for R language [1]. We refer to the documentation for details on the estimation procedure; useful tutorials are provided by the statnet community e.g. here. For examples of applications to neuroscience, see for instance [2-3]. The default model implemented here is the one selected in [3].
- Network: The network can be either fully connected and weighted (unfiltered) or thresholded and binarized (filtered). The input brain network must be stored in the v2 JSON graph format. The edge objects contain information about the elements of connectivity (or adjacency) matrix, together with any other user-specified edge covariate. In the node objects it is possible to store nodal attributes. (NB: An example of R code to transform raw data into the v2JSON format is provided in dichio/bl-ERGM/RawTov2JSON/v2JSON-writer.R)
- ERGM formula: String containing the ERGM formula according to the guidelines of the ergm package for R [1].
- nsim_gof: Integer number of simulated networks used for Goodness of Fit (GoF) model assessment.
-
unfiltered: Boolean variable specifying if the input network is not thresholded and binarized. If this is the case (unfiltered=TRUE), the app applies the ECO filtering criterion (
$k=3$ ) [4].
- estimation.txt: Result of the fitting procedure i.e. estimated parameters, st.errors, covariance matrix.
- log-computation.txt
- gof.pdf: Standard plots for the Goodness of Fit as implemented in the ergm package [1].
- mcmc-diagnostic.pdf: sanity check for the MCMC procedure.
[1] Hunter, D. R. et al. (2008). ergm: A package to fit, simulate and diagnose exponential-family models for networks. Journal of statistical software, 24(3), nihpa54860.
[2] Simpson, S. L., Hayasaka, S., & Laurienti, P. J. (2011). Exponential random graph modeling for complex brain networks. PloS one, 6(5), e20039.
[3] Obando, C., & De Vico Fallani, F. (2017). A statistical model for brain networks inferred from large-scale electrophysiological signals. Journal of The Royal Society Interface, 14(128), 20160940.
[4] De Vico Fallani, F., Latora, V., & Chavez, M. (2017). A topological criterion for filtering information in complex brain networks. PLoS computational biology, 13(1), e1005305.
