# 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
# list of changes of the risk set: each one is a list of:
# 'time' (indicating the time window where to apply the risk set reduction)
# 'dyad' (a data.frame describing the dyads to remove from the risk set
# during the time window specified in 'time')
str(randomREH$omit_dyad)
# -------------------------------------- #
# processing for tie-oriented modeling #
# -------------------------------------- #
tie_randomREH <- remify(edgelist = randomREH$edgelist,
directed = TRUE,
ordinal = FALSE,
model = "tie",
actors = randomREH$actors,
types = randomREH$types,
riskset = "manual",
origin = randomREH$origin,
omit_dyad = randomREH$omit_dyad)
# summary
summary(tie_randomREH)
# dimensions of the processed network
dim(tie_randomREH)
# Which ID is assigned to the actors with names "Francesca" and "Kayla"?
getActorID(x = tie_randomREH, actorName = c("Francesca","Kayla"))
# Which ID is assigned to the event type "conflict"?
getTypeID(x = tie_randomREH, typeName = "conflict")
# Find dyad composition (names of actor1, actor2 and type) from the dyad ID: c(1,380,760,1140)
getDyad(x = tie_randomREH, dyadID = c(1,380,760,1140))
# 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)
# dimensions of the processed network
dim(actor_randomREH)
# ------------------------------------ #
# for more information about remify() #
# check: vignette(package="remify") #
# ------------------------------------ #
Run the code above in your browser using DataLab