# (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)
Run the code above in your browser using DataLab