hb.paramgen: Randomly generate model parameters for heat-bath sampling

View source: R/eval.R

hb.paramgenR Documentation

Randomly generate model parameters for heat-bath sampling

Description

Generates random implicit environmental parameters h and a interaction matrix J. Optionally generates explicit environmental coefficients g. The j_connectivity parameter controls the fraction of non-zero off-diagonal interactions.

Usage

hb.paramgen(nn, ne = 0, j_connectivity = 1)

Arguments

nn

Integer. Number of units (species, taxa, or members).

ne

Integer. Number of environmental factors. If ne > 0, g is generated.

j_connectivity

Numeric in [0, 1]. Fraction of possible pairwise interactions set to non-zero.

Value

A list containing at least:

h

Named numeric vector of length nn. Implicit environmental parameters

J

Named numeric matrix (nn x nn), symmetric. Interaction matrix

If ne > 0, also includes:

g

Named numeric matrix (nn x ne). Explicit environmental parameters


ELAplus documentation built on May 28, 2026, 5:09 p.m.