knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
A network is a particular mathematical object consisting in a set of nodes connected with edges. If the nodes' indices are used as the row and columns of a matrix, edges' presences or weights can be represented by numbers populating this thus-called adjacency matrix.
# TODO: illustrate a binary network/matrix
SimuNet
internally represents networks as adjacency matrices, shortened in variable names as
Adj
. Various methods and functions can be used to convert such matrices into R objects more
dedicated to representing network objects, e.g. the igraph
package
relying on igraph::graph_from_adjacency_matrix()
(or the shorter igraph::graph.adjacency()
) to
convert matrices into igraph network objects.
A binary network - where an edge between two node is either present or not - is represented as a binary adjacency matrix filled with 0s and 1s.
A weighted network has edges that can be absent, or have different numerical values. These can represent:
SimuNet
)# TODO: illustrate a weighted network/matrix
SimuNet
's approachSimuNet
aims at simulating social networks "inspired" by real-life social networks:
An article on this website is dedicated to importing network data.
SimuNet
simulated networks are stored as a specific S3 class: as scanList
objects.
From a given Adj
and samp.effort
input, SimuNet
's main and eponymous function simunet()
will
generate different scanList
based on edge presence probabilities drawn from a similar Beta
distribution (see draw_edgeProb()
).
# TODO: illustrate the overall probability framework
scanList
objects are mainly 3-dimensional arrays arranged as a sequence of 2-dimensional binary
adjacency matrices, representing the "scans"; the 3rd dimension represent the sequence, i.e. the
scan indices.
# TODO: scheme of scanLists
scanList
objects also have single attribute named attrs
. attrs
is a list that contains many
characteristics or intermediate steps that can be relevant and are therefore tracked.
scanList
binary 3D arrays can be "collapsed" into weighted adjacency matrices, by summing the
array along the 3rd dimension. This can be achieved via sum_scans()
# TODO: illustrate collapsing binary sequences into weighted adjacency
In SimuNet
, simulations can be of two types:
Adj
and samp.effort
, new scanList
are generated based on
Bayesian inference. Nothing else apart from generating edges as 0 or 1
for all scans according to the drawn edge presence probabilities.Adj
and samp.effort
using
simunet()
, or on theoretical scanList
using perform_exp()
.scanList
is obtained by applying an experimental design on a theoretical
scanList
.expDesign
objects - consist in a sequence of
experimental "manipulations", represented by R functions. These sequences can be either a
combination of provided experimental "building blocks", user-defined functions, or a mix of
both.# TODO: illustrate the difference between theoretical scanList vs empirical scanList
You can find out more in these articles about theoretical simulations and empirical designs.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.