Description Usage Arguments Value Examples
Generate time-evolving outcomes where outcomes at time t of i depends on outcomes of i's adjacent peers at time t-1.
1 | peer.process(A, max.time = 3, mprob = 0.5, epsilon = 0.3)
|
A |
|
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, ... 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, ε) |
a list of time-evolving outcomes from time0
to time(max.time)
.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.