Learn R Programming

ppsbm (version 1.0.0)

statistics: Compute statistics

Description

Convert the initial data into the statistics matrix \(N_{(ij),k}\), by counting the number of events for the nodes pair types \((i,j)\) during the \(k\)-th subinterval of a regular partition (in \(K\) parts) of the time interval.

Usage

statistics(data, n, K, directed = TRUE)

Value

N[(i,j),k] = matrix with \(K\) columns, each row contains the number of events for the node pair \((i,j)\) during the k-th subinterval

Arguments

data

List with 3 components $type.seq, $time.seq, $Time (see mainVEM for more details).

n

Total number of nodes, \(1\le i \le n\).

K

Size of the regular partition, i.e. number of subintervals of the time interval. When used as input in the VEM algorithm (with hist method), \(K\) must be a power of 2.

directed

Boolean for directed (TRUE) or undirected (FALSE) case.

Examples

Run this code
# Convert the generated data into the statistics matrix N_ijk with 8 subintervals

n <- 50
K <- 2^3

obs <- statistics(generated_Q3$data,n,K,directed=FALSE)

Run the code above in your browser using DataLab