voter: Implementation of voter model dynamics on a network in R.

Description Usage Arguments Value

View source: R/voter.R

Description

Simulate voter-model-style dynamics on a network. Nodes are randomly assigned a state in (-1,1) at each time step all nodes asynchronously update by choosing their new state uniformly from their neighbors. Generates an N*L time series. The results dictionary also stores the time series as TS and ground truth adjacency matrix as ground_truth.

Usage

1
voter(input_matrix, L, noise = NULL)

Arguments

input_matrix

the input (ground-truth) graph with 'N' nodes. Must be valid square adjacency matrix.

L

the length of the desired time series.

noise

if noise is present, with this probability a node's state will be randomly redrawn from (-1,1)
independent of its neighbors' states. If 'automatic', set noise to 1/N.

Value

results a list with TS matrix an N*L array of synthetic time series data.


Fagan-Lab/dynet documentation built on March 3, 2021, 2:53 a.m.