simulate_neha_discrete | R Documentation |
A function to simulate a single cascade from the discrete-time logistic specification NEHA data generating process.
simulate_neha_discrete(x, node, time, beta, gamma, a = -8)
x |
The [(number of nodes)x(number of observed time points)]x[number of covariates + 2] data frame of covariates to be used in simulating cascades. Note, each node must be at risk for the event until the maximum time. This function does not currently permit dyadic covariates that are themselves a function of past events (e.g., the number of geographically adjacent nodes that have experienced an event) |
node |
A character string name of the variable in x that gives the node id |
time |
A character string name of the variable in x that gives the time, in integers |
beta |
A (ncol(x)-2)x1 matrix of regression coefficients with row names that match column names in x |
gamma |
A (number of diffusion ties)x1 matrix with row names of the form "sending-node_receiving-node" such that sending and receiving node ids ## match elements of x[,node]. Elements should be non-negatave numeric values. |
a |
A non-negative numeric value that models the exponential decay of sender influence. The effect of a previous event experienced by a diffusion tie sender on the log odds of an event at time t is gamma*exp(-exp(a)*(t-source_time)), where source_time is the time the sender experienced the event. |
A data frame in discrete-time EHM format for a single cascade, in which there is at most one event occurrence for each node, indicated by the 'event' variable.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.