Package: abn 3.1.13

Matteo Delucchi

abn: Modelling Multivariate Data with Additive Bayesian Networks

The 'abn' R package facilitates Bayesian network analysis, a probabilistic graphical model that derives from empirical data a directed acyclic graph (DAG). This DAG describes the dependency structure between random variables. The R package 'abn' provides routines to help determine optimal Bayesian network models for a given data set. These models are used to identify statistical dependencies in messy, complex data. Their additive formulation is equivalent to multivariate generalised linear modelling, including mixed models with independent and identically distributed (iid) random effects. The core functionality of the 'abn' package revolves around model selection, also known as structure discovery. It supports both exact and heuristic structure learning algorithms and does not restrict the data distribution of parent-child combinations, providing flexibility in model creation and analysis. The 'abn' package uses Laplace approximations for metric estimation and includes wrappers to the 'INLA' package. It also employs 'JAGS' for data simulation purposes. For more resources and information, visit the 'abn' website.

Authors:Matteo Delucchi [aut, cre], Reinhard Furrer [aut], Gilles Kratzer [aut], Fraser Iain Lewis [aut], Jonas I. Liechti [ctb], Marta Pittavino [ctb], Kalina Cherneva [ctb]

abn_3.1.13.tar.gz
abn_3.1.13.zip(r-4.7)abn_3.1.13.zip(r-4.6)abn_3.1.13.zip(r-4.5)
abn_3.1.13.tgz(r-4.6-x86_64)abn_3.1.13.tgz(r-4.6-arm64)abn_3.1.13.tgz(r-4.5-x86_64)abn_3.1.13.tgz(r-4.5-arm64)
abn_3.1.13.tar.gz(r-4.7-arm64)abn_3.1.13.tar.gz(r-4.7-x86_64)abn_3.1.13.tar.gz(r-4.6-arm64)abn_3.1.13.tar.gz(r-4.6-x86_64)
abn_3.1.13.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
abn/json (API)

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

Bug tracker:https://github.com/furrer-lab/abn/issues

Pkgdown/docs site:https://r-bayesian-networks.org

Uses libs:
  • gsl– GNU Scientific Library (GSL)
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
  • jags– Just Another Gibbs Sampler for Bayesian MCMC

On CRAN:

Conda:

bayesian-networkbinomialcategorical-datagaussiangrouped-datasetsmixed-effectsmultinomialmultivariatepoissonstructure-learninggslopenblascppopenmpjags

8.97 score 10 stars 102 scripts 546 downloads 6 mentions 117 exports 78 dependencies

Last updated from:22f9a50776. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK798
linux-devel-x86_64OK813
source / vignettesOK339
linux-release-arm64OK814
linux-release-x86_64OK821
macos-release-arm64OK559
macos-release-x86_64OK1109
macos-oldrel-arm64OK786
macos-oldrel-x86_64OK1047
windows-develOK394
windows-releaseOK1238
windows-oldrelOK443
wasm-releaseOK215

Exports:abn.versionAIC.abnFitas.data.frame.abnDagbern_bugsbern_bugsGroupBIC.abnFitbuild.controlbuildcachematrixbuildScoreCachebuildScoreCache.bayesbuildScoreCache.mlecalc.node.inla.glmcalc.node.inla.glmmcategorical_bugscategorical_bugsGroupcheck.valid.buildControlscheck.valid.dagcheck.valid.datacheck.valid.fitControlscheck.valid.groupscheck.valid.parentscheck.which.valid.nodescheckforcyclescoef.abnFitcompareDagcompareEGcreateAbnDagdiscretizationentropyDataessentialGrapheval.across.gridexpitexpit_cppexport_abnFitexport_abnFit_bayesexport_abnFit_mleexport_abnFit_mle_arcsexport_abnFit_mle_grouped_nodesexport_abnFit_mle_nodesexport_to_jsonextract_parameters_by_distributionextract_parameters_mixed_effectsextract_states_from_datafamily.abnFitfind.next.left.xfind.next.right.xfit_single_nodefit.controlfitAbnfitabn_marginalsfitAbn.bayesfitAbn.mleforLoopContentforLoopContentBayesforLoopContentFitBayesformula_abngauss_bugsgauss_bugsGroupget_link_functionget.ind.quantilesget.quantilesget.var.typesgetmarginalsgetMargsINLAgetModeVectorgetMSEfromModesinfoDagirls_binomial_cpp_fastirls_binomial_cpp_fast_brirls_gaussian_cpp_fastirls_poisson_cpp_fastlinkStrengthlogitlogit_cpplogLik.abnFitmakebugsmakebugsGroupmbmi_cppmiDatamodes2coefsmostProbablemostprobable_Cnobs.abnFitoddsorplot.abnDagplot.abnFitplot.abnHeuristicplot.abnHillClimberplot.abnMostprobableplotAbnpois_bugspois_bugsGroupprint.abnCacheprint.abnDagprint.abnFitprint.abnHeuristicprint.abnHillClimberprint.abnMostprobablerank_cppregressionLoopscoreContributionsearchHeuristicsearchhillsearchHillClimbersimulateAbnsimulateDagskewnessstd.area.under.gridstrsplitssummary.abnDagsummary.abnFitsummary.abnMostprobabletidy.cachetoGraphvizvalidate_dists

Dependencies:backportsBiocGenericsbootbroomclicodacodetoolscolorspacecowplotcpp11data.tableDerivdoBydoParalleldplyrfarverforeachforecastfracdiffgenericsggplot2glmmTMBgluegraphgtableisobanditeratorsjsonlitelabelinglatticelifecyclelme4lmtestmagrittrMASSMatrixmclogitmemiscmgcvmicrobenchmarkminqamodelrnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigpurrrR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreformulasRgraphvizrjagsrlangS7sandwichscalesstringistringrtibbletidyrtidyselecttimeDateTMBurcautf8vctrsviridisLitewithryamlzoo

Data Simulation
Fit a model to the original data | Simulate new data | Compare the original and simulated data

Last update: 2026-04-22
Started: 2024-03-15

Parallelisation
Introduction | FORK vs. PSOCK | Parallelisation in the abn package | Load the data and specify the parameters | Benchmarking

Last update: 2026-04-21
Started: 2024-03-15

Parameter Learning
Background | Fitting an ABN model | Examine the parameter estimates | Examine the marginal posterior densities

Last update: 2024-07-28
Started: 2024-03-15

Bayesian Network Structure Learning
Structure Learning of Bayesian Networks | References

Last update: 2024-03-15
Started: 2024-03-15

Mixed-effect Bayesian Network Model
Introduction | Ground truth data | Additive Bayesian Network Model fitting | Comparison with the results of the lme4 package

Last update: 2024-03-15
Started: 2024-03-15

Model Specification: Build a Cache of Scores
Background | Estimate the maximum number of parent nodes | Include prior domain knowledge

Last update: 2024-03-15
Started: 2024-03-15

Quick Start Example
Find the best fitting graphical structure using an exact search algorithm | Basic workflow with the abn package | Model specification | Load the example dataset ex1.dag.data | Set up distribution list for each node | Set the parent limits node-wise | Build the score cache | Structure learning | Plot the best fitting graphical structure | Estimate the parameters of the network | Simulate data from the fitted model

Last update: 2024-03-15
Started: 2024-03-15

Readme and manuals

Help Manual

Help pageTopics
Print AIC of objects of class 'abnFit'AIC.abnFit
Transform the adjacency matrix representation of a DAG to a data.frame with columns "from" and "to" representing directed edges.as.data.frame.abnDag
Print BIC of objects of class 'abnFit'BIC.abnFit
Control the iterations in 'buildScoreCache'build.control
Simple check on the control parameterscheck.valid.fitControls
Print coefficients of objects of class 'abnFit'coef.abnFit
Compare two DAGs or EGscompareDag
Compare two DAGs or EGscompareEG
Discretization of a Possibly Continuous Data Frame of Random Variables based on their distributiondiscretization
Computes an Empirical Estimation of the Entropy from a Table of CountsentropyData
Construct the essential graphessentialGraph
expit of proportionsexpit
expit functionexpit_cpp
Export abnFit object to structured JSON formatexport_abnFit
Print family of objects of class 'abnFit'family.abnFit
Control the iterations in 'fitAbn'fit.control
Extract Standard Deviations from all Gaussian NodesgetMSEfromModes
Compute standard information for a DAG.infoDag
Returns the strengths of the edge connections in a Bayesian Network learned from observational datalinkStrength
Logit of proportionslogit
logit functionslogit_cpp
Print logLik of objects of class 'abnFit'logLik.abnFit
Compute the Markov blanketmb
Empirical Estimation of the Entropy from a Table of CountsmiData
Convert modes to fitAbn.mle$coefs structuremodes2coefs
Find most probable DAG structuremostProbable
Print number of observations of objects of class 'abnFit'nobs.abnFit
Probability to oddsodds
Odds Ratio from a matrixor
Plots DAG from an object of class 'abnDag'plot.abnDag
Plot objects of class 'abnFit'plot.abnFit
Plot objects of class 'abnHeuristic'plot.abnHeuristic
Plot objects of class 'abnHillClimber'plot.abnHillClimber
Plot objects of class 'abnMostprobable'plot.abnMostprobable
Print objects of class 'abnCache'print.abnCache
Print objects of class 'abnDag'print.abnDag
Print objects of class 'abnFit'print.abnFit
Print objects of class 'abnHeuristic'print.abnHeuristic
Print objects of class 'abnHillClimber'print.abnHillClimber
Print objects of class 'abnMostprobable'print.abnMostprobable
Compute the score's contribution in a network of each observation.scoreContribution
A family of heuristic algorithms that aims at finding high scoring directed acyclic graphssearchHeuristic
Find high scoring directed acyclic graphs using heuristic search.searchHillClimber
Simulate data from a fitted additive Bayesian network.simulateAbn
Simulate a DAG with with arbitrary arcs densitysimulateDag
Computes skewness of a distributionskewness
Prints summary statistics from an object of class 'abnDag'summary.abnDag
Print summary of objects of class 'abnFit'summary.abnFit
Print summary of objects of class 'abnMostprobable'summary.abnMostprobable
Convert a DAG into graphviz formattoGraphviz