Package: cusna 0.1.0

Artem Maltsev

cusna: Native GPU-Accelerated Simulation and Estimation of Network Models

A self-contained native engine (a C interface over 'CUDA' kernels and C++ host logic) for stochastic actor-oriented models (the model family of 'RSiena'), exponential random graph models (cross-sectional, temporal, and separable temporal), and models for binary actor attributes, callable from R without a Python runtime. Modelled on the 'torch' package: the CRAN build is CPU-only from source; the GPU path is compiled from source when a 'CUDA' toolkit is detected at configure time. The data preparation, host statistics ('RSiena' Appendix B conventions), and moment targets are validated bit-for-bit against the reference implementation and reproduce 'RSiena' targets on public datasets to machine precision; the estimators match 'RSiena', 'ergm', 'btergm', and 'tergm' on public benchmark models.

Authors:Artem Maltsev [aut, cre]

cusna_0.1.0.tar.gz
cusna_0.1.0.tar.gz(r-4.7-arm64)cusna_0.1.0.tar.gz(r-4.7-x86_64)cusna_0.1.0.tar.gz(r-4.6-arm64)cusna_0.1.0.tar.gz(r-4.6-x86_64)
cusna_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
cusna/json (API)

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

Bug tracker:https://github.com/artemmaltsev74-techcom/cusna/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

cppopenmp

3.00 score 27 exports 1 dependencies

Last updated from:983006b400. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK283
linux-devel-x86_64OK214
source / vignettesOK338
linux-release-arm64OK287
linux-release-x86_64OK245
wasm-releaseOK146

Exports:alaam_mcmlealaam_mplealaam_simulatecusna_abi_versioncusna_beh_effectcusna_behavior_statscusna_effectcusna_francusna_gof_distributioncusna_has_cudacusna_interactioncusna_network_statscusna_rate_effectcusna_set_threadsergm_mcmleergm_mpleergm_simulateergm_statsergm_termmom_controlmom_estimatemom_estimate_multinetsaom_datasaom_multinet_datastergm_cmletergm_mpletergm_simulate

Dependencies:cpp11

Accelerating siena07() with cusna
The FRAN hook | Scope | Which path to choose

Last update: 2026-07-15
Started: 2026-07-15

Introduction to cusna
Setup | Specifying a model | Data and estimation | Covariates and behavior co-evolution | Tuning the estimator | Beyond SAOM: ERGM, TERGM, STERGM, ALAAM | Validation

Last update: 2026-07-15
Started: 2026-07-15

Readme and manuals

Help Manual

Help pageTopics
cusna: native GPU-accelerated stochastic actor-oriented modelscusna-package cusna
Maximum likelihood estimate of an ALAAM (MCMC-MLE)alaam_mcmle print.alaam_mcmle
Autologistic actor attribute model by maximum pseudo-likelihood (ALAAM)alaam_mple print.alaam_mple
Simulate the actor attribute from an ALAAM (Gibbs sampler)alaam_simulate
Native cusna engine: ABI version and CUDA availabilitycusna_abi_version cusna_has_cuda
Host behavior evaluation statisticscusna_behavior_stats
Specify SAOM model effectscusna_beh_effect cusna_effect cusna_interaction cusna_rate_effect
Fitted SAOM modelas.data.frame.cusna_fit coef.cusna_fit cusna_fit print.cusna_fit summary.cusna_fit vcov.cusna_fit
Native simulation backend for RSiena's siena07()cusna_fran
sienaGOF auxiliary distributionscusna_gof_distribution
Host network evaluation statistics (RSiena conventions)cusna_network_stats
Set the OpenMP thread count for the native CPU backendcusna_set_threads
Maximum likelihood estimate of an ERGM (MCMC-MLE)ergm_mcmle print.ergm_mcmle
Maximum pseudo-likelihood estimate (directed edges/mutual/ttriple demo)ergm_mple
Simulate networks from an ERGM (TNT sampler)ergm_simulate
Observed ERGM statistics of a networkergm_stats
Construct an ERGM termergm_term
Method-of-Moments estimation of a SAOMmom_control mom_estimate
Create a SAOM data panelsaom_data
Multi-network co-evolutionmom_estimate_multinet saom_multinet_data
Separable temporal ERGM by conditional MLE (STERGM CMLE)print.stergm_cmle stergm_cmle
Temporal ERGM by bootstrap pseudo-likelihood (btergm style)print.tergm_mple tergm_mple
Simulate from a temporal ERGM (TNT sampler with a lagged network)tergm_simulate