knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Mathematical framework

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:

# TODO: illustrate a weighted network/matrix

SimuNet's approach

Data input

SimuNet aims at simulating social networks "inspired" by real-life social networks:

An article on this website is dedicated to importing network data.

Overview

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

Two types of simulations

In SimuNet, simulations can be of two types:

# TODO: illustrate the difference between theoretical scanList vs empirical scanList

You can find out more in these articles about theoretical simulations and empirical designs.



R-KenK/SimuNet documentation built on Oct. 22, 2021, 1:27 a.m.