block_model: Construct a generic stochastic block model backend

View source: R/inference.R

block_modelR Documentation

Construct a generic stochastic block model backend

Description

Construct a generic stochastic block model backend

Usage

block_model(
  row_lookup,
  column_lookup,
  theta,
  row_group,
  column_group,
  species_col = "species",
  guild_col = "guild"
)

Arguments

row_lookup

Data frame mapping species in the matrix rows to blocks.

column_lookup

Data frame mapping species in the matrix columns to blocks.

theta

Finite guild-by-guild probability matrix with unique row and column guild names covering the supplied lookup guilds.

row_group

Name of the assemblage group placed in matrix rows.

column_group

Name of the assemblage group placed in matrix columns.

species_col

Species column in lookup tables.

guild_col

Guild column in lookup tables.

Value

An inference_model with subclass block_model. Prediction returns a probability network using the supplied block assignments and probabilities; no model fitting is performed. Unmatched local species are listed in metadata$excluded_rows and metadata$excluded_columns.


metaweave documentation built on Nov. 3, 2026, 9:06 a.m.