peer.process: Generate direct transmission process

Description Usage Arguments Value Examples

View source: R/peerprocess.R

Description

Generate time-evolving outcomes where outcomes at time t of i depends on outcomes of i's adjacent peers at time t-1.

Usage

1
peer.process(A, max.time = 3, mprob = 0.5, epsilon = 0.3)

Arguments

A

[n x n] adjacency matrix.

max.time

the maximum discrete time that direct transmission occurs.

mprob

the maximum susceptibility probability, i.e. maximum probability that i's outcome at time t depends on i's peers at time t-1.

epsilon

standard deviation of error process. This adds uncertainties in outcomes.

For t=1,2, ... max.time :

p ~ Unif(0, mprob)

Y^t_i= (1 - p)Y^{t-1}_i + p ∑_{j} A_ij Y^{t-1}_j / ∑_{j} A_ij + N(0, ε)

Value

a list of time-evolving outcomes from time0 to time(max.time).

Examples

1
2
3
4
5
6
library(netdep)
library(igraph)
library(stats)
G = latent.netdep(n.node = 100, rho = 0.2)
A = as.matrix(get.adjacency(G))
outcomes = peer.process(A, max.time = 3, mprob = 0.3, epsilon = 0.5)

netdep documentation built on May 2, 2019, 5:52 a.m.