data_neha_discrete | R Documentation |
A function to create data for NEHA with discrete time EHA data
data_neha_discrete(eha_data, node, time, event, cascade)
eha_data |
A dataframe that includes one observation for each node at risk of experiencing the event during each at-risk time point in each cascade. Note, it is assumed that each node can experience an event in each cascade once, at most. |
node |
A character string name of the variable that gives the node id. Node ids should be character type variables. |
time |
A character string name of the variable that gives the time, in integers. |
event |
A character string name of the variable that gives the binary 0/1 indicator of event occurrence. |
cascade |
A character string name of the variable that gives the cascade id |
A data frame in which, in addition to all of the variables in 'eha_data', there is one column for each directed dyad, named 'i_j', where 'i' and 'j' are node ids, in which the value indicates the number of time points before 'time' that 'i' experienced the event in the respective 'cascade'. If 'i' did not experience the cascade before 'time', the value is 0.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.