Package: llrem 0.1.1

llrem: LLM Relational Event Models

Fit Cox proportional hazards relational event models (REMs), including a separable formulation that partitions events into initiation and continuation sub-models. Optionally augments REM simulations with large language model (LLM) agents that select targets conditioned on event history, supporting multiple providers ('OpenAI', 'Anthropic', 'xAI'/'Grok', 'Google Gemini', 'Ollama', 'AWS Bedrock') through a common interface. See Butts (2008) <doi:10.1111/j.1467-9531.2008.00203.x> for description of relational event modeling.

Authors:C. Ben Gibson [aut, cre]

llrem_0.1.1.tar.gz
llrem_0.1.1.zip(r-4.7)llrem_0.1.1.zip(r-4.6)llrem_0.1.1.zip(r-4.5)
llrem_0.1.1.tgz(r-4.6-x86_64)llrem_0.1.1.tgz(r-4.6-arm64)llrem_0.1.1.tgz(r-4.5-x86_64)llrem_0.1.1.tgz(r-4.5-arm64)
llrem_0.1.1.tar.gz(r-4.7-arm64)llrem_0.1.1.tar.gz(r-4.7-x86_64)llrem_0.1.1.tar.gz(r-4.6-arm64)llrem_0.1.1.tar.gz(r-4.6-x86_64)
llrem_0.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
llrem/json (API)
NEWS

# Install 'llrem' in R:
install.packages('llrem', repos = c('https://cbengibson2.r-universe.dev', 'https://cloud.r-project.org'))
Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • edgelist - Militarized Interstate Dispute conflict edgelist
  • n_nodes - Number of nodes in the MID edgelist

On CRAN:

Conda:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

cpp

1.00 score 33 exports 28 dependencies

Last updated from:426669706e. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK205
linux-devel-x86_64OK205
source / vignettesOK182
linux-release-arm64OK205
linux-release-x86_64OK214
macos-release-arm64OK283
macos-release-x86_64OK330
macos-oldrel-arm64OK226
macos-oldrel-x86_64OK413
windows-develOK185
windows-releaseOK176
windows-oldrelOK187
wasm-releaseOK108

Exports:attach_covariates_dfcompare_rem_modelscompute_hazard_surfacecompute_seq_stat_meanscov_dyad_staticcov_dyad_temporalcov_node_staticcov_node_temporalfit_remfit_rem_sepllm_callllm_provider_anthropicllm_provider_bedrockllm_provider_geminillm_provider_grokllm_provider_mockllm_provider_ollamallm_provider_openaillm_provider_openai_compatmake_behavior_queriesmake_query_predictmake_query_roleplay_randommake_query_roleplay_sendermake_stat_meansmake_suffstatsmock_strategy_highest_indegreemock_strategy_max_idmock_strategy_min_idprepare_edgelistrem_cfgrem_covariatesrun_llm_remrun_multiagent_rem

Dependencies:askpassclicpp11curlfarverggplot2gluegtablehttr2isobandlabelinglatticelifecyclemagrittrMatrixopensslR6rappdirsRColorBrewerRcpprlangS7scalessurvivalsysvctrsviridisLitewithr

Readme and manuals

Help Manual

Help pageTopics
Attach exogenous covariates to a pre-built risk-set data frameattach_covariates_df
Forest plot comparing fitted REM coefficientscompare_rem_models
Compute the full hazard surface over all directed dyadscompute_hazard_surface
Compute sufficient-statistic means for a sequence without fitting a REMcompute_seq_stat_means
Create a static dyad-level covariatecov_dyad_static
Create a temporal dyad-level covariatecov_dyad_temporal
Create a static node-level covariatecov_node_static
Create a temporal node-level covariatecov_node_temporal
Militarized Interstate Dispute conflict edgelistedgelist
Fit a Relational Event Model to an edgelistfit_rem
Fit a Separable Relational Event Modelfit_rem_sep
Call an LLM providerllm_call
Create an Anthropic Claude LLM providerllm_provider_anthropic
Create an AWS Bedrock LLM providerllm_provider_bedrock
Create a Google Gemini LLM providerllm_provider_gemini
Create an xAI Grok LLM providerllm_provider_grok
Create a mock LLM provider for testingllm_provider_mock
Create a local or remote Ollama LLM providerllm_provider_ollama
Create an OpenAI LLM providerllm_provider_openai
Create a generic OpenAI-compatible LLM providerllm_provider_openai_compat
Generate plain-language behavioral guidelines from empirical sufficient statsmake_behavior_queries
Query factory: LLM predicts the next eventmake_query_predict
Query factory: LLM roleplays as a randomly assigned nodemake_query_roleplay_random
Query factory: LLM roleplays as the empirical sendermake_query_roleplay_sender
Compute per-term mean sufficient statistics for realized eventsmake_stat_means
Extract sufficient-statistic means from a REM risk-set data framemake_suffstats
Mock strategy: pick the valid target with the highest in-degreemock_strategy_highest_indegree
Mock strategy: always pick the largest valid targetmock_strategy_max_id
Mock strategy: always pick the smallest valid targetmock_strategy_min_id
Number of nodes in the MID edgelistn_nodes
Normalise a raw edgelist to the standard three-column formatprepare_edgelist
Create a prompt configuration objectrem_cfg
Collect covariate objects for use in fit_remrem_covariates
Generate an LLM event sequence and fit a REMrun_llm_rem
Run a multi-agent REM-LLM conflict simulationrun_multiagent_rem