Skip to contents

A randomly generated sequence of relational events with 5 actors and 100 events. The event sequence is generated by following an actor-oriented modeling approach (for more information on the algorithm used for the generation, refer to help(topic = remulateActor, package = "remulate") or ?remulate::remulateActor).

Usage

data(ao_data)

Format

ao_data is a list object containing the following objects:

edgelist

a data.frame with the raw simulated edgelist. The columns of the data.frame are:

time

the timestamp indicating the time at which each event occurred

actor1

the actor that generated the relational event

actor2

the actor that received the relational event

seed

the seed value used in remulate::remulateActor() for generating the event sequence

true.pars

a list of two vectors named "rate_model" and "choice_model", each containing the values of the parameters used in the generation of the event sequence

Examples


# (1) load the data into the workspace
data(ao_data)

# (2) process event sequence with \code{remify}
ao_reh <- remify::remify(edgelist = ao_data$edgelist, model = "actor")

# (3) define linear predictor and claculate stastistcs with \code{remstats} package

## linear predictor for the rate model
rate_model <- ~ 1 + remstats::indegreeSender()

## linear predictror for the choice model
choice_model <- ~ remstats::inertia() + remstats::reciprocity()

## calculate statistics
ao_reh_stats <- remstats::remstats(reh = ao_reh, sender_effects = rate_model, 
receiver_effects = choice_model)

# (4) estimate model using method = "MLE" and print out summary

## estimate model
mle_ao <- remstimate::remstimate(reh = ao_reh, stats = ao_reh_stats, method = "MLE")

## print out a summary of the estimation
summary(mle_ao)
#> Relational Event Model (actor oriented) 
#> 
#> Call rate model **for sender**:
#> 
#> 	~1 + remstats::indegreeSender()
#> 
#> 
#> Coefficients rate model (MLE with interval likelihood):
#> 
#>                   Estimate    Std. Err     z value Pr(>|z|) Pr(=0)
#> baseline        -4.8062015   0.1832563 -26.2266709      0.0 <2e-16
#> indegreeSender  -0.0083633   0.0159467  -0.5244534      0.6 0.8971
#> Null deviance: 1177.625 on 100 degrees of freedom
#> Residual deviance: 1177.348 on 98 degrees of freedom
#> Chi-square: 0.2770484 on 2 degrees of freedom, asymptotic p-value 0.8706422 
#> AIC: 1181.348 AICC: 1181.472 BIC: 1186.558
#> -------------------------------------------------------------------------------- 
#> 
#> Call choice model **for receiver**:
#> 
#> 	~remstats::inertia() + remstats::reciprocity()
#> 
#> 
#> Coefficients choice model (MLE with interval likelihood):
#> 
#>              Estimate  Std. Err   z value Pr(>|z|) Pr(=0)
#> inertia     -0.032508  0.077037 -0.421983   0.6730 0.9015
#> reciprocity  0.018287  0.071630  0.255305   0.7985 0.9064
#> Null deviance: 2.772589 on 100 degrees of freedom
#> Residual deviance: 277.0551 on 98 degrees of freedom
#> Chi-square: -274.2826 on 2 degrees of freedom, asymptotic p-value 1 
#> AIC: 281.0551 AICC: 281.1789 BIC: 286.2655