Transform processed relational event sequences to different formats


This vignette explains input arguments, output structure and usage of the function remify::rehshape().


Aim

remify::rehshape() transforms a remify object into another object with a structure that is suitable to external packages. The function can return the data inputs required by the functions:

Both functions are available inside the relevent package (Butts C., 2023).


Input

The input arguments of remify::rehshape() are:


Output

The output structure of the function is different according to the chosen output_format:


Usage

To explain the usage of the function remify::rehshape(), we consider the example edgelist available with the data randomREH. First, we process the edgelist with remify::remify().

library(remify)
data(randomREH) 
reh_remify <- remify::remify(edgelist = randomREH$edgelist, model = "tie")
reh_remify
## Relational Event Network
## (processed for tie-oriented modeling):
##  > events = 9915
##  > actors = 20
##  > (event) types = 3
##  > riskset = full
##  > directed = TRUE
##  > ordinal = FALSE
##  > weighted = FALSE
##  > time length ~ 80 days
##  > interevent time 
##       >> minimum ~ 0.0011 seconds
##       >> maximum ~ 5811.4011 seconds

Then, we can transform the remify object to any of the possible output formats:

reh_rem <- remify::rehshape(data = reh_remify, 
                      output_format = c("relevent-rem"))
names(reh_rem)                     
## [1] "eventlist" "supplist"  "timing"
reh_rem.dyad <- remify::rehshape(data = reh_remify, 
                      output_format = c("relevent-rem.dyad"))
names(reh_rem.dyad)                     
## [1] "edgelist" "n"        "ordinal"

mirror server hosted at Truenetwork, Russian Federation.