data_neha_discrete: A function to create data for NEHA with discrete time EHA...

View source: R/neha.R

data_neha_discreteR Documentation

A function to create data for NEHA with discrete time EHA data

Description

A function to create data for NEHA with discrete time EHA data

Usage

data_neha_discrete(eha_data, node, time, event, cascade)

Arguments

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

Value

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.


desmarais-lab/dnehm documentation built on Jan. 17, 2025, 11:57 a.m.