Augmented Modelling of Relational Events

An integrated workflow for relational event models, in which timestamped interactions among actors arrive in continuous time and the event rate depends on the history of the network itself. Event streams are simulated by an exact Gillespie kernel or an approximate tau-leap kernel; non-events are drawn by case-control sampling in the manner of Lerner and Lomi (2020) , or from a time-shifted copy of the process so that covariates shared by all dyads at a given time remain estimable (Lembo et al. 2025, ); the timing- and closure-based endogenous statistics of Juozaitiene and Wit (2024) are computed from that history; and one front-end fits the resulting case-control data by conditional-logistic partial likelihood, by penalised regression on its degenerate one-control binomial form (which admits smooth, time-varying and actor random effects), or by stochastic gradient descent, including the additive-spline construction of Filippi-Mazzola and Wit (2024) . Martingale-residual goodness-of-fit diagnostics are provided for the linear fit, together with simulation and statistic computation for relational hyper-events, a collection of documented event logs from published interaction networks, and a reconstructed El Nino index as a global covariate.


amorem

amorem logo

R-CMD-check pkgdown docs status prototype

amorem is an R package for simulation and inference in relational event models (REMs) and relational hyper event models (RHEMs) — dynamic network data in continuous time.

📖 Documentation

Everything lives on the documentation site:

→ franciscorichter.github.io/amorem

Installation, the quick-start tutorial, the full guide set (simulation, endogenous catalogue, estimation, hyperedge models, datasets, analyses of bundled event logs, validation experiments), and the complete function reference are all there.

What the package covers

  • Simulation — simulate_relational_events() with an exact Gillespie kernel or an approximate tau-leap kernel; simulators for undirected and directed hyper-events.
  • Data intake — standardize_event_log(), sample_non_events() (case-control sampling), attach_static_covariates(), simulate_actor_covariates().
  • Statistics — endogenous_features() (timing, closure and balance effects of Juozaitienė & Wit) and hyperedge_features().
  • Estimation — rem() with three backends: clogit (conditional-logistic partial likelihood), gam (one-control binomial form with smooth, time-varying and random effects: tv(), nl(), tvnl(), re()), and nn (neural or additive-spline scorer; nn_uncertainty() gives bootstrap bands, and nn_control(engine = "torch") is optional).
  • Model comparison and fit — compare_models() and its _global / _smooth variants; martingale-residual goodness of fit (gof_*(), martingale_residuals()).
  • Data — nine documented event logs (data/, sources in data-raw/).

Development

devtools::document()        # regenerate man/ and NAMESPACE
devtools::test()            # tests/testthat
devtools::check(cran = TRUE)
pkgdown::build_site()       # local preview of the docs site

CI runs R CMD check on GitHub Actions (.github/workflows/R-CMD-check.yaml) and, on every push to main, builds the pkgdown site and deploys it to the gh-pages branch, so the site needs no manual deploy. Web-only guides live in vignettes/articles/ and are excluded from the CRAN build.

Remotes. origin is GitHub (public; CRAN URL, issues, the docs site). forge is the private Forgejo working copy (forge:pancho/amorem).

Status

  • CRAN: 1.1.0, published 2026-10-17. The main branch is 1.2.0 (new gof_rem(), thirteen new datasets, the data catalogue), not yet submitted.
  • Planned: a hyper-event case-control sampler with history-aware masking, so that hyper-event data can be fitted with rem(); resolving the S3 class clash on "rem" with relevent::rem() and redeem::rem().
  • Open check: the coxme path with two random-effect axes (random_effects = c("sender", "receiver")) has not been re-validated since the stratification fix.
  • Companion paper: the software paper describing version 1.0.0 is being revised outside this repository (host air, ~/System/Research/amorem-revision-20260812/). The local paper/ folder is gitignored.

References

Methodological background for the models implemented in amorem:

License

MIT, see LICENSE.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("amorem")

1.2.0 by Francisco Richter, 17 days ago


https://franciscorichter.github.io/amorem/, https://github.com/franciscorichter/amorem


Report a bug at https://github.com/franciscorichter/amorem/issues


Browse source code at https://github.com/cran/amorem


Authors: Francisco Richter [aut, cre] , Martina Boschi [aut] , Ernst C. Wit [aut] , Melania Lembo [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports splines, stats, Rcpp, survival, withr

Suggests torch, testthat, mgcv, coxme, roxygen2, pkgdown, knitr, rmarkdown

Linking to Rcpp


See at CRAN