Skip to content
R package for Generalised Hypergeometric Ensembles of Random Graphs (gHypEG)
Branch: master
Clone or download
Latest commit 48bf8ab Feb 6, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
data added data for vignette Jan 30, 2019
man fixes for CRAN Feb 2, 2019
vignettes fixes for CRAN Feb 2, 2019
.Rbuildignore fixed cran-comments Feb 2, 2019
.gitattributes added github linguist fix for docs Jan 11, 2019
.gitignore fixed cran-comments Feb 2, 2019
DESCRIPTION fix for cran Feb 6, 2019
LICENSE license Jan 18, 2018
NAMESPACE fixed cran-comments Feb 2, 2019



ghypernet is an OpenSource R package that allows to estimate and work with Generalised Hypergeometric Ensembles of Random Graphs (gHypEG).

ghypernet has been developed specifically for the analysis of large networks characterised by a large number of repeated edges. It provides efficient methods to perform hypothesis testing and model selection on such data.

The theoretical foundation of this paper, gHypEGs, was developed in the following works:

  1. Casiraghi, G., Nanumyan, V., Scholtes, I., Schweitzer, F. (2016) Generalized Hypergeometric Ensembles: Statistical Hypothesis Testing in Complex Networks. arXiv Prepr. arXiv1607.02441
  2. Casiraghi, G., Nanumyan, V., Scholtes, I., Schweitzer, F. (2017) From Relational Data to Graphs: Inferring Significant Links Using Generalized Hypergeometric Ensembles in Social Informatics. SocInfo 2017 111-120 (Springer Verlag, 2017). doi:10.1007/978-3-319-67256-4_11
  3. Casiraghi, G., Nanumyan, V. (2018) Generalised hypergeometric ensembles of random graphs: the configuration model as an urn problem. arXiv Prepr. arXiv1810.06495
  4. Casiraghi, G. (2018) Analytical Formulation of the Block-Constrained Configuration Model. arXiv Prepr. arXiv1811.05337


The package uses the library BiasedUrn to work with Wallenius' non-central hypergeometric distribution. Although this is not required, it is recommended to install the BiasedUrn R package, increasing the number of 'colors', i.e., the number of dimensions of the distribution. It can be easily done modifying the makevar file. In case the BiasedUrn library cannot be found, all computations will be performed using the multinomial approximation.


You can install this package directly from GitHub. In R, run the following commands to install the package:




The research and development behind ghypernet is performed at the Chair of Systems Design, ETH Zürich.


Giona Casiraghi (project lead)

Vahan Nanumyan


ghypernet is licensed under the GNU Affero General Public License.

(c) Copyright ETH Zürich, 2016-2019

You can’t perform that action at this time.