Network Histograms
Overview
Estimates network histograms, a blockmodel approximation to the graphon underlying a network's connectivity pattern, for both single-layer and multilayer networks. Implements graphon estimation methods including the profile-likelihood method of Olhede and Wolfe (2014) doi:10.1073/pnas.1400374111 and the least-squares method of Gao, Lu, and Zhou (2015) doi:10.1214/15-AOS1354 for single-layer networks, and the multilayer extension of Song and Olhede (2026) doi:10.1093/comnet/cnag042.
New features
logLik(): new S3 method fornethist,multinethist, andhnethistobjects. Returns the unnormalized Bernoulli log-likelihood as alogLikobject withdfandnobsattributes, soAIC()andBIC()work directly on a fit. UselogLik(fit, normalized = TRUE)for the per-edge normalized value stored infit$normalized_LL.hnethist(): added examples to the help page.summary(): new S3 method fornethist,multinethist, andhnethistobjects. Reports the fit dimensions, the edge density, the log-likelihood with its degrees of freedom,AIC,BIC, and, forhnethist, the shape selection.
Bug fixes
Show all changes in 1.1.0Hide the rest of the changes in 1.1.0
hnethist():normalized_LLis now divided by the number of edgessum(A)/2, matchingnethist()andmultinethist(). Previously it was divided bysum(A), so reported values were half the size of the correspondingnethist()values. Model selection andBICare unaffected.print()methods fornethist,multinethist, andhnethistnow respect thedigitsargument when printing the normalized likelihood and the mean squared error.netsummary_plot(): the example using the suggested package **network** is now guarded byrequireNamespace().logLik()on amultinethistfit that collapses to a single block now reports the correct degrees of freedom.multinethist():method = "LSE"with multilayer input now raises an error. Previously it was accepted silently, the fit was computed by profile likelihood, and the returned object was labelled"LSE".
Class hierarchy
- All fitted objects now inherit from a common base class,
network_histogram:nethistfits have classc("nethist", "network_histogram"),multinethistfitsc("multinethist", "network_histogram"), andhnethistfitsc("hnethist", "nethist", "network_histogram"). Previouslyhnethistinherited fromnethistwhilemultinethistwas unrelated to either. logLik()and theprint()method of the summary objects are defined once onnetwork_histogram.summary.multinethist()andsummary.hnethist()extend the base method throughNextMethod(). Methods whose behaviour depends on the layer dimension, namelyplot(),plot3d(),fitted(), andprint(), remain specific to the subclasses.- See
?"network_histogram-class"for the documented hierarchy. - Code that tests for an exact class vector, such as
identical(class(fit), c("hnethist", "nethist")), needs updating. Useinherits()instead.
User-visible changes
- The
print()methods fornethist,multinethist, andhnethistare now compact. They identify the fit and reportthetahatby its dimensions only, instead of printing the whole probability matrix or array, and theAvailable componentslisting has been dropped. The detailed output moved to the newsummary()methods. Useobject$thetahatorfitted()for the estimated probabilities.
Documentation
nethist(),multinethist(), andhnethist()now state in their help pages that the greedy search is stochastic and converges to a local optimum, and thatset.seed()should be called immediately before the fit for reproducible results.hnethist()additionally notes that its merging step drawsstats::kmeans()starting centres from the same stream, so the selected number of shapes depends on it.- The
@returnssections ofnethist(),multinethist(), andhnethist()now state the full class vector includingnetwork_histogram, andmultinethist()lists themethodfield. - Removed the leftover prompt boilerplate from the
polblogandpolblog_edgelisthelp pages, as requested by the CRAN team. - The
polblogandpolblog_edgelistexamples now calligraph::delete_vertices()instead of the deprecatedigraph::delete.vertices().
From NEWS.md in the release
Install
Health
- OK13 OKNow
- OK11 OK2026-09-06
- ERROR8 OK, 1 ERROR2026-09-04
Documentation
- Help pages
- 20 (1 internal)includes a package overview page
- Examples that run
- 28%5 run in a plain check · 13 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 95%
- Return-value docs
- 100%
- Help pages citing references
- 35%
Downloads
Repository
- PRs merged (all time)
- 82%
- Median days to close, 50 most recently updated closed issues
- 104
- Median days to close, 50 most recently updated closed PRs
- 0
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
7 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/enigmasong/nethist on 2026-10-21.
The R CMD check workflow runs on Linux
GitHub Pages site last deployed 2026-08-22 · The repository has a site deploy workflow
pkgdown site last built 2026-08-22, before release 1.1.0 (2026-10-23)
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.1.0Latest
- 1.0.02026-09-02
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-09-02
- Total releases
- 2 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 265 KB / 3 files
- Download size
- 867 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("nethist")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.