fitted.nethist: Fitted values for a nethist model

View source: R/fitted_nethist.R

fitted.nethistR Documentation

Fitted values for a nethist model

Description

Returns a submatrix of the fitted block-probability or graphon matrix for a nethist or hnethist object.

Usage

## S3 method for class 'nethist'
fitted(object, set1 = NULL, set2 = NULL, type = "nethist", ...)

Arguments

object

a nethist or hnethist object from nethist() or hnethist().

set1

integer vector of vertex indices for rows. NULL uses all vertices.

set2

integer vector of vertex indices for columns. NULL uses all vertices.

type

one of "nethist" (default) or "prob". "nethist" returns the graphon estimate thetahat / rho_hat; "prob" returns the raw block probability matrix thetahat.

...

currently unused.

Value

A numeric matrix of dimension ⁠|set1| x |set2|⁠.

See Also

nethist(), hnethist(), multinethist()

Examples


set.seed(1)
A <- igraph::as_adjacency_matrix(
  igraph::sample_gnp(60, 0.3), sparse = FALSE)
fit <- nethist(A, h = 10L)
fitted(fit, set1 = 1:10, set2 = 1:10)
fitted(fit, type = "prob")


nethist documentation built on Oct. 25, 2026, 5:07 p.m.