ergmx.Term#

class ergmx.Term[source]#

A model term: one or more network statistics.

dyad_independent = True#

Whether the term’s change statistic only depends on the toggled dyad.

triadic = False#

Whether the term counts triangles, so that triadic proposals help the MCMC mix.

directed = None#

True if only defined for directed networks, False if only for undirected.

degree_dependence = None#

The degrees the statistic is a function of (“in”, “out”; both for degrees of undirected networks), so that it is constant when they are preserved; None if it is not a function of degrees.

is_offset = False#

Whether the coefficient is fixed by offset() rather than estimated.

curved = False#

its statistics’ coefficients are a nonlinear function of fewer parameters (gwesp with an estimated decay).

Type:

Whether the term is curved

names(network)[source]#

Names of the term’s statistics.

param_names(network)[source]#

Names of the term’s parameters: its statistics’, unless curved.

eta(params, network)[source]#

Coefficients of the statistics from the parameters (the same, unless curved).

jacobian(params, network)[source]#

Derivatives of eta with respect to the parameters (statistics x parameters).

starts(network)[source]#

Starting values of the parameters a fit can’t start at 0 (the decays of curved terms), as (position among the term’s parameters, value).

spec(network)[source]#

The term as the Rust core expects it: (name, real params, integer params).

full_spec(network)[source]#

The spec with the terms an operator applies to (none for plain terms).

r_call()[source]#

The term as R deparses it, for the names of F() terms.