The aim of the function remstimate() is to find the set
of model parameters that optimizes either: (1) the likelihood function
given the observed data or (2) the posterior probability of the
parameters given the prior information on their distribution and the
likelihood of the data. Furthermore, the likelihood function may differ
depending on the modeling framework used, be it tie-oriented or
actor-oriented:
the tie-oriented framework, which models the occurrence of dyadic events as realization of ties along with their waiting time (Butts 2008);
the actor-oriented framework, which models the occurrence of the dyadic events as a two-steps process (Stadtfeld and Block 2017):
The mandatory input arguments of remstimate() are:
reh, which is a remify object of the
processed relational event history (processing function
remify available with the package remify,
install.packages("remify"));
stats, a remstats object (the
remstats function for calculating network statistics is
available with the package remstats,
install.packages("remstats")). A linear predictor for the
model is specified via a formula object (for the actor-oriented
framework, up to two linear predictors can be specified) and supplied to
the function remstats::remstats() along with the
remify object. When attr(reh,"model") is
"tie", stats consists of only one array of
statistics; if attr(reh,"model") is "actor",
stats consists of a list that can contain up to two arrays
named "sender_stats" and "receiver_stats". The
first array contains the statistics for the sender model (event rate
model), the second array for the receiver model (multinomial choice
model). Furthermore, it is possible to calculate the statistics for only
the sender model or only the receiver model, by supplying the formula
object only for one of the two models. For more details on the use of
remstats::remstats(), see
help(topic=remstats,package=remstats).
Along with the two mandatory arguments, the argument
method refers to the optimization routine to use for the
estimation of the model parameters and its default value is
"MLE". Methods available in remstimate are:
Maximum Likelihood Estimation ("MLE") and
Hamiltonian Monte Carlo ("HMC").
In order to optimize model parameters, the available approaches
resort to either the Frequentist theory or the Bayesian theory. The
remstimate package provides two optimization methods to
estimate the model parameters:
"MLE"), a second-order optimization algorithm;"HMC").To provide a concise overview of the two approaches, consider a time-ordered sequence of \(M\) relational events, \(E_{t_M}=(e_1,\ldots,e_M)\), the array of statistics (explanatory variables) \(X\), and \(\boldsymbol{\beta}\) the vector of model parameters describing the effect of the explanatory variables, which we want to estimate. The explanation that follows below is valid for both tie-oriented and actor-oriented modeling frameworks.
The aim of the Frequentist approach is to find the set of parameters \(\boldsymbol{\hat{\beta}}\) that maximizes the value of the likelihood function \(\mathscr{L}(\boldsymbol{\beta}; E_{t_M},X)\), that is
\[ \boldsymbol{\hat{\beta}}=\mathop{\mathrm{arg\,max}}_{\boldsymbol{\beta}}\{\mathscr{L}(\boldsymbol{\beta};E_{t_M},X)\} \]
Whereas, the aim of the Bayesian approach is to find the set of parameters \(\boldsymbol{\hat{\beta}}\) that maximizes the posterior probability of the model which is proportional to the likelihood of the observed data and the prior distribution assumed over the model parameters,
\[p(\boldsymbol{\beta}|E_{t_M},X) \propto \mathscr{L}(\boldsymbol{\beta}; E_{t_M},X) p(\boldsymbol{\beta})\]
where \(p(\boldsymbol{\beta})\) is the prior distribution of the model parameters which, for instance, can be assumed as a multivariate normal distribution,
\[ \boldsymbol{\beta} \sim \mathcal{N}(\boldsymbol{\mu_{0}},\Sigma_{0}) \]
with parameters \((\boldsymbol{\mu_{0}},\Sigma_{0})\) summarizing the prior information that the researcher may have on the distributon of \(\boldsymbol{\beta}\).
remstimate package)Before starting, we want to first load the remstimate
package. This will load in turn remify and
remstats, which we need respectively for processing the
relational event history and for calculating/processing the statistics
specified in the model:
library(remstimate)
In this tutorial, we are going to use the main functions from
remify and remstats by setting their arguments
to the default values. However, we suggest the user to read through the
documentation of the two packages and their vignettes in order to get
familiar with their additional functionalities (e.g., possibility of
defining time-varying risk set, calculating statistics for a specific
time window, and many others).
For the tie-oriented modeling, we refer to the seminal paper by Butts (2008), in which the author introduces the likelihood function of a relational event model (REM). Relational events are modeled in a tie-oriented approach along with their waiting time (if measured). When the time variable is not available, then the model reduces to the Cox proportional-hazard survival model (Cox 1972).
Consider a time-ordered sequence of \(M\) relational events, \(E_{t_M}=(e_1,\ldots,e_M)\), where each event \(e_{m}\) in the sequence is described by the 4-tuple \((s_{m},r_{m},c_{m},t_{m})\), respectively sender, receiver, type and time of the event. Furthermore,
The likelihood function that models a relational event sequence with a tie-oriented approach is, \[ \mathscr{L}(\boldsymbol{\beta}; E_{t_M},X)= \prod_{m=1}^{M}{\Bigg[\lambda(e_{m},t_{m},\boldsymbol{\beta})\prod_{e\in \mathcal{R}}^{}{\exp{\left\lbrace-\lambda(e,t_{m},\boldsymbol{\beta})\left(t_m-t_{m-1}\right)\right\rbrace} }}\Bigg] \]
where:
vignette(package="remstats") for more
information about statistics calculated per unique time point
or per observed event), number of columns equal to number of
dyadic events (\(D\)), (see
vignette(topic="remify",package="remify") for more
information on how to quantify the number of dyadic events), number of
slices equal to the number of variables in the linear predictor (\(P\)).vignette(topic="riskset",package="remify")
for more information on alternative definitions of the risk set), which
means that all the possible dyadic events are at risk at any time
point;If the time of occurrence of the events is not available and we know only their order of occurrence, then the likelihood function reduces to the Cox proportional-hazard survival model (Cox 1972),
\[ \mathscr{L}(\boldsymbol{\beta}; E_{t_M},X)= \prod_{m=1}^{M}{\Bigg[\frac{\lambda(e_{m},t_{m},\boldsymbol{\beta})}{\sum_{e\in \mathcal{R}}^{}{\lambda(e,t_{m},\boldsymbol{\beta})}}}\Bigg] \]
In order to get started with the optimization methods available in
remstimate, we consider the data tie_data,
that is a list containing a simulated relational event sequence where
events were generated by following a tie-oriented process. We are going
to model the event rate \(\lambda\) of
any event event \(e\) at risk at time
\(t_{m}\) as:
\[\lambda(e,t_{m},\boldsymbol{\beta}) = \exp{\left\{\beta_{intercept} + \beta_{\text{indegreeSender}}\text{indegreeSender}(s_e,t_{m}) + \\ +\beta_{\text{inertia}}\text{inertia}(s_e,r_e,t_{m}) + \beta_{\text{reciprocity}}\text{reciprocity}(s_e,r_e,t_{m})\right\}}\]
Furthermore, we know that the true parameters quantifying
the effect of the statistics (name in subscript next to \(\beta\)) and used in the generation of the
event sequence are: \[\begin{bmatrix}
\beta_{intercept} \\ \beta_{\text{indegreeSender}} \\
\beta_{\text{inertia}} \\ \beta_{\text{reciprocity}} \end{bmatrix} =
\begin{bmatrix} -5.0 \\ 0.01 \\ -0.1 \\ 0.03\end{bmatrix}\] The
parameters are also available as object within the list,
tie_data$true.pars.
# setting `ncores` to 1 (the user can change this parameter)
ncores <- 1L
# loading data
data(tie_data)
# true parameters' values
tie_data$true.pars
## intercept indegreeSender inertia reciprocity
## -5.00 0.01 -0.10 0.03
# processing the event sequence with 'remify'
tie_reh <- remify::remify(edgelist = tie_data$edgelist, model = "tie")
# summary of the (processed) relational event network
summary(tie_reh)
## Relational Event Network
## (processed for tie-oriented modeling):
## > events = 100
## > actors = 5
## > (event) types = 1
## > riskset = full
## >> included dyads = 20
## > directed = TRUE
## > ordinal = FALSE
## > weighted = FALSE
## > time length ~ 808
## > interevent time
## >> minimum ~ 0.1832
## >> maximum ~ 63.6192
remstimate() in 3 stepsThe estimation of a model can be summarized in three steps:
remstats
(statistics calculated by the user can be also supplied to
remstats::remstats()).# specifying linear predictor (with `remstats`) using a 'formula'
tie_model <- ~ 1 + remstats::indegreeSender() +
remstats::inertia() + remstats::reciprocity()
remstats::remstats() from the
remstats package.# calculating statistics (with `remstats`)
tie_stats <- remstats::remstats(reh = tie_reh, tie_effects = tie_model)
# the tie-oriented 'remstats' object
tie_stats
## Relational Event Network Statistics
## > Model: tie-oriented
## > Computation method: per time point
## > Dimensions: 99 time points x 20 dyads x 4 statistics
## > Statistics:
## >> 1: baseline
## >> 2: indegreeSender
## >> 3: inertia
## >> 4: reciprocity
remstimate::remstimate().# for example the method "MLE"
remstimate::remstimate(reh = tie_reh,
stats = tie_stats,
method = "MLE",
ncores = ncores)
## Relational Event Model (tie oriented)
##
## Coefficients:
##
## baseline indegreeSender inertia reciprocity
## -4.94090709 0.04545055 -0.20029598 -0.05222633
##
## Null deviance: 1206.316
## Residual deviance: 1200.483
## AIC: 1208.483 AICC: 1208.909 BIC: 1218.864
In the sections below, we show the estimation of the parameters using
both available methods and we also show the usage and output of the
methods available for a remstimate object.
tie_mle <- remstimate::remstimate(reh = tie_reh,
stats = tie_stats,
ncores = ncores,
method = "MLE",
WAIC = TRUE, # setting WAIC computation to TRUE
nsimWAIC = 100) # number of draws for the computation of the WAIC set to 100
# printing the 'remstimate' object
tie_mle
## Relational Event Model (tie oriented)
##
## Coefficients:
##
## baseline indegreeSender inertia reciprocity
## -4.94090709 0.04545055 -0.20029598 -0.05222633
##
## Null deviance: 1206.316
## Residual deviance: 1200.483
## AIC: 1208.483 AICC: 1208.909 BIC: 1218.864 WAIC: 1208.932
# summary of the 'remstimate' object
summary(tie_mle)
## Relational Event Model (tie oriented)
##
## Call:
## ~1 + remstats::indegreeSender() + remstats::inertia() + remstats::reciprocity()
##
##
## Coefficients (MLE with interval likelihood):
##
## Estimate Std. Err z value Pr(>|z|) Pr(=0)
## baseline -4.940907 0.189944 -26.012434 0.0000 <2e-16
## indegreeSender 0.045451 0.036505 1.245052 0.2131 0.8209
## inertia -0.200296 0.088254 -2.269550 0.0232 0.4310
## reciprocity -0.052226 0.098194 -0.531868 0.5948 0.8962
## Null deviance: 1206.316 on 99 degrees of freedom
## Residual deviance: 1200.483 on 95 degrees of freedom
## Chi-square: 5.833064 on 4 degrees of freedom, asymptotic p-value 0.2119669
## AIC: 1208.483 AICC: 1208.909 BIC: 1218.864 WAIC: 1208.932
Under the column named \(Pr(>|z|)\), the usual test on the
z value for each parameter. As to the column named \(Pr(=0|x)\), an approximation of the
posterior probability of each parameter being equal to 0.
# AIC
AIC(tie_mle)
## [1] 1208.483
# AICC
AICC(tie_mle)
## [1] 1208.909
# BIC
BIC(tie_mle)
## [1] 1218.864
# WAIC
WAIC(tie_mle)
## [1] 1208.932
# diagnostics
tie_mle_diagnostics <- diagnostics(object = tie_mle, reh = tie_reh, stats = tie_stats)
# plot
plot(x = tie_mle, reh = tie_reh, diagnostics = tie_mle_diagnostics)
tie_hmc <- remstimate::remstimate(reh = tie_reh,
stats = tie_stats,
method = "HMC",
ncores = ncores,
nsim = 200L, # 200 draws to generate per each chain
nchains = 2L, # 2 chains to generate
burnin = 200L, # burnin length is 200
thin = 2L, # thinning size set to 2 (the final length of the chains will be 100)
seed = 23029, # set a seed only for reproducibility purposes
WAIC = TRUE, # setting WAIC computation to TRUE
nsimWAIC = 100 # number of draws for the computation of the WAIC set to 100
)
# summary
summary(tie_hmc)
## Relational Event Model (tie oriented)
##
## Call:
## ~1 + remstats::indegreeSender() + remstats::inertia() + remstats::reciprocity()
##
##
## Posterior Modes (HMC with interval likelihood):
##
## Post.Mode Post.SD Q2.5% Q50% Q97.5% Pr(=0|x)
## baseline -4.9738e+00 1.0244e-01 -5.1298e+00 -4.9498e+00 -4.7421 < 2e-16
## indegreeSender 4.7209e-02 2.2185e-02 2.9913e-05 4.4926e-02 0.0853 0.50835
## inertia -1.7753e-01 5.2532e-02 -2.8617e-01 -1.9470e-01 -0.0945 0.03189
## reciprocity -6.7931e-02 5.2635e-02 -1.3849e-01 -4.7775e-02 0.0763 0.81225
## Log posterior: -600.4316
Q2.5%, Q50% and Q97.5% are
respectively the percentile 2.5, the median (50th percentile) and the
percentile 97.5.
# diagnostics
tie_hmc_diagnostics <- diagnostics(object = tie_hmc, reh = tie_reh, stats = tie_stats)
# plot (histograms and trace plot have highest posterior density intervals dashed lines in blue and posterior estimate in red)
plot(x = tie_hmc, reh = tie_reh, diagnostics = tie_hmc_diagnostics)
For the actor-oriented modeling, we refer the modeling framework introduced by Stadtfeld and Block (2017), in which the process of realization of a relational event is described by two steps:
The first step is modelled via a rate model (similar to a REM), in which the waiting times are modelled along with the sequence of the senders of the observed relational events. The second step is modelled via a multinomial discrete choice model, where we model the choice of the receiver of the next event conditional to the active sender at the first step.
Therefore, the two models can be described by two separate likelihood
functions with their own set of parameters. The parameters in each model
will describe the effect that explanatory variables (network dynamics
and other available exogenous statistics) have on the two distinct
processes. The estimation of the model parameters for each model can be
carried out separately and for this reason, the user can also provide a
remstats object containing the statistics of either both or
one of the two models.
Consider a time-ordered sequence of \(M\) relational events, \(E_{t_M}=(e_1,\ldots,e_M)\), where each
event \(e_{m}\) in the sequence is
described by the 3-tuple \((s_{m},r_{m},t_{m})\) (we exclude here the
information about the event type), respectively sender, receiver, and
time of the event. Furthermore, consider \(N\) to be the number of actors in the
network. For simplicity, we assume that all actors in the network can be
the sender or the receiver of a relational event (i.e. full
risk set, see vignette(topic="riskset",package="remify")
for more information on alternative definitions of the risk set) and we
use the index \(n\) to indicate any
actor in the set \(\mathcal{R}\) of
actors at risk, thus \(n \in \left\lbrace
1,2,\ldots,N\right\rbrace\).
The likelihood function that models the sender activity is:
\[ \mathscr{L}_{\text{sender model}}(\boldsymbol{\theta}; E_{t_M},X)= \prod_{m=1}^{M}{\Bigg[\tau(s_{m},t_{m},\boldsymbol{\theta})\prod_{n \in \mathcal{R}}^{}{\exp{\left\lbrace-\tau(n,t_{m},\boldsymbol{\theta})\left(t_m-t_{m-1}\right)\right\rbrace} }}\Bigg] \]
where:
vignette(package="remstats") for more
information about statistics calculated per unique time point
or per observed event), number of columns equal to number of
actors in the sequence (\(N\)), number
of slices equal to the number of variables in the linear predictor
(\(P\)).If the time of occurrence of the events is not available and we know only their order of occurrence, then the likelihood function for the sender model reduces to the Cox proportional-hazard survival model (Cox 1972),
\[ \mathscr{L}_{\text{sender model}}(\boldsymbol{\theta}; E_{t_M},X)= \prod_{m=1}^{M}{\Bigg[\frac{\tau(s_{m},t_{m},\boldsymbol{\theta})}{\sum_{n\in \mathcal{R}}^{}{\tau(n,t_{m},\boldsymbol{\theta})}}}\Bigg] \]
The likelihood function that models the receiver choice is:
\[ \mathscr{L}_{\text{receiver model}}(\boldsymbol{\beta}; E_{t_M},X)=\prod_{m=1}^{M}{\Bigg[\frac{\exp{\left\lbrace\boldsymbol{\beta}^{T}U_{[m,r_m,.]}\right\rbrace}}{\sum_{n \in \mathcal{R} \setminus \left\lbrace s_m \right\rbrace }^{}{\exp{\left\lbrace\boldsymbol{\beta}^{T}U_{[m,n,.]}\right\rbrace}}}\Bigg]} \]
where:
vignette(package="remstats") for more information about
statistics calculated per unique time point or per observed
event), number of columns equal to number of actors (\(N\)), number of slices equal to the number
of variables in the linear predictor (\(K\)).Consider the data ao_data, that is a list containing a
simulated relational event sequence where events were generated by
following the two-steps process described in the section above. We are
going to model the sender activity rate and the receiver choice as:
\[ \tau(n,t_{m},\boldsymbol{\theta}) = \exp{\left\lbrace \theta_{\text{intercept}} + \theta_{indegreeSender}\text{indegreeSender}(n,t_{m})\right\rbrace} \]
\[ \exp{\left\lbrace \boldsymbol{\beta}^{T}U_{[m,n,.]} \right\rbrace} = \exp{\left\lbrace \beta_{\text{inertia}}\text{inertia}(s_m,n,t_{m}) + \beta_{\text{reciprocity}}\text{reciprocity}(s_m,n,t_{m})\right\rbrace}\]
Furthermore, we know that true parameters quantifying the effect of the statistics (name in subscript next to the model parameters \(\theta\) and \(\beta\)) used in the generation of the event sequence are:
The parameters are also available as object within the list,
ao_data$true.pars.
# setting `ncores` to 1 (the user can change this parameter)
ncores <- 1L
# loading data
data(ao_data)
# true parameters' values
ao_data$true.pars
## $rate_model
## intercept indegreeSender
## -5.00 0.01
##
## $choice_model
## inertia reciprocity
## -0.10 0.03
# processing event sequence with 'remify'
ao_reh <- remify::remify(edgelist = ao_data$edgelist, model = "actor")
# summary of the relational event network
summary(ao_reh)
## Relational Event Network
## (processed for actor-oriented modeling):
## > events = 100
## > actors = 5
## > (event) types = 1
## > riskset = full
## > sender model riskset: 5 / 5 actors
## > receiver model riskset: 4 receivers per sender
## > directed = TRUE
## > ordinal = FALSE
## > weighted = FALSE
## > time length ~ 2689
## > interevent time
## >> minimum ~ 0.8542
## >> maximum ~ 167.3494
remstimate() in 3 stepsThe estimation of a model can be summarized in three steps:
remstats
(statistics calculated by the user can be also supplied to
remstats::remstats()).# specifying linear predictor (for rate and choice model, with `remstats`)
rate_model <- ~ 1 + remstats::indegreeSender()
choice_model <- ~ remstats::inertia() + remstats::reciprocity()
remstats::remstats() from the
remstats package.# calculating statistics (with `remstats`)
ao_stats <- remstats::remstats(reh = ao_reh, sender_effects = rate_model, receiver_effects = choice_model)
# the actor-oriented 'remstats' object
ao_stats
## Relational Event Network Statistics
## > Model: actor-oriented
## > Computation method: per time point
## > Sender model:
## >> Dimensions: 99 time points x 5 actors x 2 statistics
## >> Statistics:
## >>> 1: baseline
## >>> 2: indegreeSender
## > Receiver model:
## >> Dimensions: 99 events x 5 actors x 2 statistics
## >> Statistics:
## >>> 1: inertia
## >>> 2: reciprocity
remstimate::remstimate().# for example the method "MLE"
remstimate::remstimate(reh = ao_reh,
stats = ao_stats,
method = "MLE",
ncores = ncores)
## Relational Event Model (actor oriented)
##
## Coefficients rate model **for sender**:
##
## baseline indegreeSender
## -4.838760102 -0.005995972
##
## Null deviance: 1167.764
## Residual deviance: 1167.623
## AIC: 1171.623 AICC: 1171.748 BIC: 1176.813
##
## --------------------------------------------------------------------------------
##
## Coefficients choice model **for receiver**:
##
## inertia reciprocity
## -0.03250836 0.01828749
##
## Null deviance: 274.4863
## Residual deviance: 274.2826
## AIC: 278.2826 AICC: 278.4076 BIC: 283.4728
In the sections below, as already done with the tie-oriented
framework, we show the estimation of the parameters using both available
methods and we also show the usage and output of the methods available
for a remstimate object.
ao_mle <- remstimate::remstimate(reh = ao_reh,
stats = ao_stats,
ncores = ncores,
method = "MLE",
WAIC = TRUE, # setting WAIC computation to TRUE
nsimWAIC = 100) # number of draws for the computation of the WAIC set to 100
# printing the 'remstimate' object
ao_mle
## Relational Event Model (actor oriented)
##
## Coefficients rate model **for sender**:
##
## baseline indegreeSender
## -4.838760102 -0.005995972
##
## Null deviance: 1167.764
## Residual deviance: 1167.623
## AIC: 1171.623 AICC: 1171.748 BIC: 1176.813 WAIC: 1171.391
##
## --------------------------------------------------------------------------------
##
## Coefficients choice model **for receiver**:
##
## inertia reciprocity
## -0.03250836 0.01828749
##
## Null deviance: 274.4863
## Residual deviance: 274.2826
## AIC: 278.2826 AICC: 278.4076 BIC: 283.4728 WAIC: 278.4401
# summary of the 'remstimate' object
summary(ao_mle)
## 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.838760 0.185118 -26.138826 0.0000 <2e-16
## indegreeSender -0.005996 0.015982 -0.375175 0.7075 0.9027
## Null deviance: 1167.764 on 99 degrees of freedom
## Residual deviance: 1167.623 on 97 degrees of freedom
## Chi-square: 0.1414688 on 2 degrees of freedom, asymptotic p-value 0.9317093
## AIC: 1171.623 AICC: 1171.748 BIC: 1176.813 WAIC: 1171.391
## --------------------------------------------------------------------------------
##
## 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.9010
## reciprocity 0.018287 0.071630 0.255305 0.7985 0.9059
## Null deviance: 274.4863 on 99 degrees of freedom
## Residual deviance: 274.2826 on 97 degrees of freedom
## Chi-square: 0.2037334 on 2 degrees of freedom, asymptotic p-value 0.90315
## AIC: 278.2826 AICC: 278.4076 BIC: 283.4728 WAIC: 278.4401
# AIC
AIC(ao_mle)
## sender model receiver model
## 1171.6227 278.2826
# AICC
AICC(ao_mle)
## sender model receiver model
## 1171.7477 278.4076
# BIC
BIC(ao_mle)
## sender model receiver model
## 1176.8130 283.4728
# WAIC
WAIC(ao_mle)
## sender model receiver model
## 1171.3908 278.4401
# diagnostics
ao_mle_diagnostics <- diagnostics(object = ao_mle, reh = ao_reh, stats = ao_stats)
# plot
plot(x = ao_mle, reh = ao_reh, diagnostics = ao_mle_diagnostics)
ao_hmc <- remstimate::remstimate(reh = ao_reh,
stats = ao_stats,
method = "HMC",
ncores = ncores,
nsim = 300L, # 300 draws to generate per each chain
nchains = 2L, # 2 chains (each one long 200 draws) to generate
burnin = 300L, # burnin length is 300
L = 100L, # number of leap-frog steps
epsilon = 0.1/100, # size of a leap-frog step
thin = 2L, # thinning size (this will reduce the final length of each chain will be 150)
seed = 23029, # set a seed only for reproducibility purposes
WAIC = TRUE, # setting WAIC computation to TRUE
nsimWAIC = 100 # number of draws for the computation of the WAIC set to 100
)
# summary
summary(ao_hmc)
## Relational Event Model (actor oriented)
##
## Call rate model **for sender**:
##
## ~1 + remstats::indegreeSender()
##
##
## Posterior Modes rate model (HMC with interval likelihood):
##
## Post.Mode Post.SD Q2.5% Q50% Q97.5% Pr(=0|x)
## baseline -4.8522814 0.1154292 -5.0455567 -4.8246585 -4.6134 <2e-16
## indegreeSender -0.0047507 0.0098748 -0.0237661 -0.0060711 0.0117 0.8986
## Log posterior: -583.9322
## --------------------------------------------------------------------------------
##
## Call choice model **for receiver**:
##
## ~remstats::inertia() + remstats::reciprocity()
##
##
## Posterior Modes choice model (HMC with interval likelihood):
##
## Post.Mode Post.SD Q2.5% Q50% Q97.5% Pr(=0|x)
## inertia -0.0331986 0.0429158 -0.1187147 -0.0231174 0.0489 0.8806
## reciprocity 0.0192208 0.0417183 -0.0703949 -0.0012063 0.0862 0.8995
## Log posterior: -137.1414
# diagnostics
ao_hmc_diagnostics <- diagnostics(object = ao_hmc, reh = ao_reh, stats = ao_stats)
# plot (only for the receiver_model, by setting sender_model = NA)
plot(x = ao_hmc, reh = ao_reh, diagnostics = ao_hmc_diagnostics, sender_model = NA)