Package: amorem 1.2.0

Francisco Richter

amorem: 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) <doi:10.1017/nws.2019.57>, 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, <doi:10.1093/jrsssc/qlaf058>); the timing- and closure-based endogenous statistics of Juozaitiene and Wit (2024) <doi:10.1093/jrsssa/qnae132> 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) <doi:10.1093/jrsssc/qlae023>. 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.

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

amorem_1.2.0.tar.gz
amorem_1.2.0.zip(r-4.7-x86_64)amorem_1.2.0.zip(r-4.7-arm64)amorem_1.2.0.zip(r-4.6-x86_64)amorem_1.2.0.zip(r-4.6-arm64)amorem_1.2.0.zip(r-4.5-x86_64)
amorem_1.2.0.tgz(r-4.6-x86_64)amorem_1.2.0.tgz(r-4.6-arm64)amorem_1.2.0.tgz(r-4.5-x86_64)amorem_1.2.0.tgz(r-4.5-arm64)
amorem_1.2.0.tar.gz(r-4.7-arm64)amorem_1.2.0.tar.gz(r-4.7-x86_64)amorem_1.2.0.tar.gz(r-4.6-arm64)amorem_1.2.0.tar.gz(r-4.6-x86_64)
amorem_1.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
amorem/json (API)

# Install 'amorem' in R:
install.packages('amorem', repos = c('https://franciscorichter.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/franciscorichter/amorem/issues

Pkgdown/docs site:https://franciscorichter.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

Conda:

cpp

6.26 score 1 stars 28 scripts 402 downloads 32 exports 5 dependencies

Last updated from:56add2030c. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK230
linux-devel-x86_64OK188
source / vignettesOK194
linux-release-arm64OK191
linux-release-x86_64OK275
macos-release-arm64OK193
macos-release-x86_64OK404
macos-oldrel-arm64OK152
macos-oldrel-x86_64OK602
windows-devel-arm64OK399
windows-devel-x86_64OK281
windows-release-arm64OK370
windows-release-x86_64OK230
windows-oldrel-x86_64OK183
wasm-releaseOK124

Exports:as_dyadic_logas_hyperedge_logattach_static_covariatescompare_modelscompare_models_globalcompare_models_smoothcpp_supported_statsendogenous_featuresgof_auxiliarygof_globalgof_multivariategof_remgof_univariatehyperedge_activityhyperedge_featureshyperedge_loghyperedge_sizeshyperedge_subrepis_hyperedge_logmartingale_residualsnn_controlnn_uncertaintyremsample_non_eventssimulate_actor_covariatessimulate_directed_hyperedge_eventssimulate_directed_hyperevents_tvnlsimulate_hyperedge_eventssimulate_relational_eventsstandardize_event_logtransform_recencywiden_case_control

Dependencies:latticeMatrixRcppsurvivalwithr

Species invasions as a relational event process
Why model invasions as relational events? | Ingredients | A simulated invasion record | Why ordinary case-control sampling cannot see ENSO | Time-shifted sampling | Recovering the drivers | Where to go from here | References

Last update: 2026-10-17
Started: 2026-05-14

Model comparison on a real REM dataset
1. Load a bundled REM dataset | 2. Build candidate specifications | 3. Compare by AIC | Multiple controls per case | 4. Inspect coefficients of a chosen specification | 5. Cross-implementation guarantee | References

Last update: 2026-10-16
Started: 2026-05-14

Endogenous mechanisms and time-varying global covariates
Endogenous reciprocity | Time-varying global covariates | Composing endogenous and global | Caveat

Last update: 2026-06-17
Started: 2026-05-14

Exogenous dyadic covariates
US state distance matrix | Defining a non-linear effect | Simulating events with exogenous covariates | Recovering the effect with a GAM | Plotting estimated vs true effect

Last update: 2026-06-17
Started: 2026-02-23

Simulating relational events
Simulating actor covariates | Simulating event sequences

Last update: 2026-06-17
Started: 2026-02-17

Readme and manuals

Help Manual

Help pageTopics
Alien species first records, prepared for relational event modelsalien_invasions
Alien mammals: risk table with covariates (Juozaitienė et al. 2023)alien_mammals
Attach static covariates to an event logattach_static_covariates
Classroom actor attributes (McFarland 2001)classroom_actors
Classroom interaction events (McFarland 2001)classroom_events
CollegeMsg: private messages on a university online communitycollege_msg
Compare candidate endogenous specifications by AICcompare_models
Compare REM specifications with global covariate effectscompare_models_global
Compare candidate specifications with smooth (TV / NL / TVNL) effectscompare_models_smooth
Bills of the 118th US Congress as hypereventscongress_bills_118
Members of the 118th US Congresscongress_members_118
Copenhagen Networks Study: phone calls, text messages and gendercopenhagen copenhagen_actors copenhagen_calls copenhagen_sms
Endogenous statistics with a compiled fast pathcpp_supported_stats
Daily weather at the places and periods of the bundled event logsdaily_weather
US state distance matrixdist_matrix
Email-Eu-Core temporal (single-department subset)email_eu_core
Compute endogenous event-network statisticsendogenous_features
Reconstructed Niño3.4 ENSO index, 1301-2005 (Li et al. 2013)enso_nino34
Men's international football results since 1872football_results
GOF test for an auxiliary (unmodelled) statisticgof_auxiliary
Omnibus GOF test via Cauchy combinationgof_global
Multivariate GOF test for smooth or random-effect covariatesgof_multivariate
Goodness of fit for a fitted relational event modelgof_rem
Goodness-of-fit test for a single FLE covariategof_univariate
Activity counter for hyperedge subsetshyperedge_activity
Endogenous features for a hyperedge event loghyperedge_features
Build / detect / convert hyperedge event logsas_dyadic_log as_hyperedge_log hyperedge_log is_hyperedge_log
Cardinality columns for a hyperedge event loghyperedge_sizes
Subset repetition statistic for a hyperedge event loghyperedge_subrep
Martingale residuals from a case-control partial-likelihood fitmartingale_residuals
Control parameters for the neural-network backend of rem()nn_control
Bootstrap uncertainty for the neural rem() backendnn_uncertainty
Oceanic Niño Index, 1950-presentoni
Plot partial-dependence uncertainty bandsplot.nn_uncertainty
Public holidays for the periods of the bundled event logspublic_holidays
Manufacturing-company email events (Nurek & Michalski 2020)radoslaw_email
Reporting hierarchy of the manufacturing company (Nurek & Michalski 2020)radoslaw_hierarchy
Fit a relational (hyper)event model on preprocessed case-control datarem
Sample non-events for inferencesample_non_events
Simulate exogenous actor covariatessimulate_actor_covariates
Simulate directed two-mode hyperedge eventssimulate_directed_hyperedge_events
Simulate directed hyper-events with time-varying and non-linear effectssimulate_directed_hyperevents_tvnl
Simulate undirected hyperedge events (multi-actor meetings)simulate_hyperedge_events
Simulate relational event sequencessimulate_relational_events
Actor attributes for the Social Evolution studysocial_evolution_actors
Phone calls in the Social Evolution study (Madan et al. 2012)social_evolution_calls
Friendship-survey events for the Social Evolution studysocial_evolution_friendship
Standardize a relational event logstandardize_event_log
Recency transform of inter-event time gapstransform_recency
UCDP dyadic conflict data, 1946-2025ucdp_dyads
US leader-to-leader visits, 1945-2019us_leader_visits
Convert a long case-control event log to wide case-1-control formatwiden_case_control