| remify | R Documentation |
A function that processes raw relational event history data and returns a S3 object of class 'remify' which is used as input in other functions inside 'remverse'.
remify(
edgelist,
directed = TRUE,
ordinal = FALSE,
model = c("tie", "actor"),
actors = NULL,
riskset = c("full", "active", "active_saturated", "manual"),
manual_riskset = NULL,
extend_riskset_by_type = FALSE,
event_type = NULL,
event_weight = NULL,
origin = NULL,
time_units = c("auto", "secs", "mins", "hours", "days", "weeks", "months", "years"),
aggregate_time = 1,
attach_riskset = TRUE,
riskset_decode = c("labels", "ids", "none"),
riskset_max_decode = 200000L,
event_attributes = NULL,
ncores = 1L,
duration = FALSE,
dur_directed_end = FALSE,
dur_type_exclusive = FALSE
)
edgelist |
the relational event history. An object of class |
directed |
logical value indicating whether events are directed ( |
ordinal |
logical value indicating whether only the order of events matters in the model ( |
model |
either |
actors |
[optional] character vector of actors' names that may be observed interacting in the network. If |
riskset |
[optional] character value indicating the type of risk set to process: |
manual_riskset |
[optional] When |
extend_riskset_by_type |
logical. |
event_type |
Optional. Either If If When event types are present (via |
event_weight |
Optional. Either If If |
origin |
[optional] starting time point of the observation period (default is |
time_units |
Character string specifying the time unit for converting time values when 'edgelist$time' is of class Date or POSIXct; ignored for numeric or integer time. Default is "secs". |
aggregate_time |
Integer >= 1. Event-time aggregated based on unique time points.
Keeps every |
attach_riskset |
Logical. If |
riskset_decode |
Character. Controls how (and whether) the included risk set
dyads are decoded and attached in
|
riskset_max_decode |
Integer. Maximum number of included dyads (i.e.,
|
event_attributes |
Optional character vector of column names in
These columns are stored as Note: |
ncores |
[optional] number of cores used in the parallelization of the processing functions. (default is |
duration |
Logical. If |
dur_directed_end |
Logical. Only used when |
dur_type_exclusive |
Logical. Only used when |
A remify S3 object (list) with the following elements:
M number of events (or unique time points if simultaneous events exist).
N number of actors.
C number of event types (1 if untyped).
D number of dyads in the riskset.
intereventTime vector of inter-event waiting times (NULL if ordinal=TRUE).
edgelist processed input edgelist as data.frame.
edgelist_id per-event integer ID summary.
edgelist_dual processed input edgelist with duration as data.frame.
meta list of metadata (model, directed, ordinal, riskset, dictionary, etc.).
ids list of per-event integer IDs (actor1, actor2, dyad, type).
index list of decoded riskset tables (dyad_map or dyad_map_active for tie model; sender_map for actor model).
activeD number of active dyads (tie model, riskset="active" or "manual" only).
riskset_info decoded riskset metadata (tie model only, when attach_riskset=TRUE).
durem list of metadata for events with duration.
For actor-oriented models (model="actor"), the following additional elements are returned:
sender_riskset integer vector of actor IDs allowed to send (all actors for "full"; observed senders for "active"; senders in manual_riskset for "manual"/"active_saturated").
receiver_riskset named list (actor names) of integer vectors of allowed receiver IDs per sender. Depends on the chosen riskset vie the argument riskset.
activeN number of active senders.
index\$sender_map data.frame with columns senderID and actorName for active senders.
# load package and random network 'randomREH'
library(remify)
data(randomREH)
# first events in the sequence
head(randomREH$edgelist)
# actor's names
randomREH$actors
# event type's names
randomREH$types
# start time of the study (origin)
randomREH$origin
# -------------------------------------- #
# processing for tie-oriented modeling #
# -------------------------------------- #
tie_randomREH <- remify(edgelist = randomREH$edgelist,
directed = TRUE,
ordinal = FALSE,
model = "tie",
origin = randomREH$origin)
# summary
summary(tie_randomREH)
# visualize descriptive measures of relational event data
plot(x = tie_randomREH)
# -------------------------------------- #
# processing for actor-oriented modeling #
# -------------------------------------- #
# loading network 'randomREHsmall'
data(randomREHsmall)
# processing small random network
actor_randomREH <- remify(edgelist = randomREHsmall$edgelist,
directed = TRUE,
ordinal = FALSE,
model = "actor",
actors = randomREHsmall$actors,
origin = randomREHsmall$origin)
# summary
summary(actor_randomREH)
# visualize
plot(actor_randomREH)
# ------------------------------------ #
# for more information about remify() #
# check: vignette(package="remify") #
# ------------------------------------ #
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.