This document is an automatically generated cross reference for the
ergm model terms from the stanet
project. The source for this data and additional descriptions are in
the ?ergm.terms
help file or the ergm manual.
It is possible to search the ergm
terms help page and
search for specific keywords of terms using the
search.ergmTerms
command. For example to find all the terms
that mention ‘triangle’ in their description:
## Found 9 matching ergm terms:
## Symmetrize(formula, rule="weak") (binary)
## Evaluation on symmetrized (undirected) network
##
## ctriple(attr=NULL, diff=FALSE, levels=NULL) (binary)
## ctriad (binary)
## Cyclic triples
##
## localtriangle(x) (binary)
## Triangles within neighborhoods
##
## nodemix(attr, base=NULL, b1levels=NULL, b2levels=NULL, levels=NULL, levels2=-1) (binary)
## nodemix(attr, base=NULL, b1levels=NULL, b2levels=NULL, levels=NULL, levels2=-1, form="sum") (valued)
## Nodal attribute mixing
##
## opentriad (binary)
## Open triads
##
## threetrail(keep=NULL, levels=NULL) (binary)
## threepath(keep=NULL, levels=NULL) (binary)
## Three-trails
##
## triangle(attr=NULL, diff=FALSE, levels=NULL) (binary)
## triangles(attr=NULL, diff=FALSE, levels=NULL) (binary)
## Triangles
##
## tripercent(attr=NULL, diff=FALSE, levels=NULL) (binary)
## Triangle percentage
##
## ttriple(attr=NULL, diff=FALSE, levels=NULL) (binary)
## ttriad (binary)
## Transitive triples
Or to find all of the dyad-independent bipartite terms:
## Found 9 matching ergm terms:
## b1cov(attr) (binary)
## b1cov(attr, form="sum") (valued)
## Main effect of a covariate for the first mode in a bipartite network
##
## b1factor(attr, base=1, levels=-1) (binary)
## b1factor(attr, base=1, levels=-1, form="sum") (valued)
## Factor attribute effect for the first mode in a bipartite network
##
## b1nodematch(attr, diff=FALSE, keep=NULL, alpha=1, beta=1, byb2attr=NULL, levels=NULL) (binary)
## Nodal attribute-based homophily effect for the first mode in a bipartite network
##
## b1sociality(nodes=-1) (binary)
## b1sociality(nodes=-1, form="sum") (valued)
## Degree
##
## b2cov(attr) (binary)
## b2cov(attr, form="sum") (valued)
## Main effect of a covariate for the second mode in a bipartite network
##
## b2factor(attr, base=1, levels=-1) (binary)
## b2factor(attr, base=1, levels=-1, form="sum") (valued)
## Factor attribute effect for the second mode in a bipartite network
##
## b2nodematch(attr, diff=FALSE, keep=NULL, alpha=1, beta=1, byb1attr=NULL, levels=NULL) (binary)
## Nodal attribute-based homophily effect for the second mode in a bipartite network
##
## b2sociality(nodes=-1) (binary)
## b2sociality(nodes=-1, form="sum") (valued)
## Degree
##
## diff(attr, pow=1, dir="t-h", sign.action="identity") (binary)
## diff(attr, pow=1, dir="t-h", sign.action="identity", form ="sum") (valued)
## Difference
For convenience, this table lists a subset of the most commonly-used ergm terms and keywords.
Term | bin | bip | dir | dyad-indep | op | val | undir |
---|---|---|---|---|---|---|---|
b1cov | ✔ | ✔ | ✔ | ✔ | ✔ | ||
b1degree | ✔ | ✔ | ✔ | ||||
b1factor | ✔ | ✔ | ✔ | ✔ | ✔ | ||
b1nodematch | ✔ | ✔ | ✔ | ✔ | |||
b2concurrent | ✔ | ✔ | ✔ | ||||
b2cov | ✔ | ✔ | ✔ | ✔ | ✔ | ||
b2degree | ✔ | ✔ | ✔ | ||||
b2factor | ✔ | ✔ | ✔ | ✔ | ✔ | ||
b2nodematch | ✔ | ✔ | ✔ | ✔ | |||
degree | ✔ | ✔ | |||||
diff | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |
edgecov | ✔ | ✔ | ✔ | ✔ | ✔ | ||
gwdegree | ✔ | ✔ | |||||
idegree | ✔ | ✔ | |||||
isolates | ✔ | ✔ | ✔ | ||||
mm | ✔ | ✔ | ✔ | ✔ | ✔ | ||
mutual | ✔ | ✔ | ✔ | ||||
nodecov | ✔ | ✔ | ✔ | ✔ | ✔ | ||
nodefactor | ✔ | ✔ | ✔ | ✔ | ✔ | ||
nodeicov | ✔ | ✔ | ✔ | ||||
nodeifactor | ✔ | ✔ | ✔ | ✔ | |||
nodematch | ✔ | ✔ | ✔ | ✔ | ✔ | ||
nodemix | ✔ | ✔ | ✔ | ✔ | ✔ | ||
odegree | ✔ | ✔ | |||||
triangle | ✔ | ✔ | ✔ |
For convenience, this table lists operator terms: terms that wrap or modify other terms.
Term | bin | bip | dir | dyad-indep | val | undir |
---|---|---|---|---|---|---|
B | ✔ | |||||
Curve | ✔ | ✔ | ||||
Exp | ✔ | ✔ | ||||
F | ✔ | |||||
For | ✔ | |||||
Label | ✔ | ✔ | ||||
Log | ✔ | ✔ | ||||
NodematchFilter | ✔ | |||||
Offset | ✔ | |||||
Prod | ✔ | ✔ | ||||
S | ✔ | |||||
Sum | ✔ | ✔ | ||||
Symmetrize | ✔ | ✔ |
This table lists the complete set of terms available in the ergm package. In HTML versions, clicking on a term name will jump to its definition.
Term | op | val | bin | dir | dyad-indep | quant nodal attr | undir | cat nodal attr | curved | triad rel | bip | freq | nneg | quant dyad attr | cat dyad attr |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B | ✔ | ✔ | |||||||||||||
Curve | ✔ | ✔ | ✔ | ||||||||||||
Exp | ✔ | ✔ | ✔ | ||||||||||||
F | ✔ | ✔ | |||||||||||||
For | ✔ | ✔ | |||||||||||||
Label | ✔ | ✔ | ✔ | ||||||||||||
Log | ✔ | ✔ | ✔ | ||||||||||||
NodematchFilter | ✔ | ✔ | |||||||||||||
Offset | ✔ | ✔ | |||||||||||||
Prod | ✔ | ✔ | ✔ | ||||||||||||
S | ✔ | ✔ | |||||||||||||
Sum | ✔ | ✔ | ✔ | ||||||||||||
Symmetrize | ✔ | ✔ | ✔ | ||||||||||||
absdiff | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||
absdiffcat | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||
altkstar | ✔ | ✔ | ✔ | ✔ | |||||||||||
asymmetric | ✔ | ✔ | ✔ | ✔ | |||||||||||
atleast | ✔ | ✔ | ✔ | ✔ | |||||||||||
atmost | ✔ | ✔ | ✔ | ✔ | |||||||||||
attrcov | ✔ | ✔ | ✔ | ✔ | |||||||||||
b1concurrent | ✔ | ✔ | ✔ | ✔ | |||||||||||
b1cov | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||
b1degrange | ✔ | ✔ | ✔ | ||||||||||||
b1degree | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
b1dsp | ✔ | ✔ | ✔ | ||||||||||||
b1factor | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||
b1mindegree | ✔ | ✔ | ✔ | ||||||||||||
b1nodematch | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||
b1sociality | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
b1star | ✔ | ✔ | ✔ | ✔ | |||||||||||
b1starmix | ✔ | ✔ | ✔ | ✔ | |||||||||||
b1twostar | ✔ | ✔ | ✔ | ✔ | |||||||||||
b2concurrent | ✔ | ✔ | ✔ | ✔ | |||||||||||
b2cov | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||
b2degrange | ✔ | ✔ | ✔ | ||||||||||||
b2degree | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
b2dsp | ✔ | ✔ | ✔ | ||||||||||||
b2factor | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||
b2mindegree | ✔ | ✔ | ✔ | ||||||||||||
b2nodematch | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||
b2sociality | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
b2star | ✔ | ✔ | ✔ | ✔ | |||||||||||
b2starmix | ✔ | ✔ | ✔ | ✔ | |||||||||||
b2twostar | ✔ | ✔ | ✔ | ✔ | |||||||||||
balance | ✔ | ✔ | ✔ | ✔ | |||||||||||
coincidence | ✔ | ✔ | ✔ | ||||||||||||
concurrent | ✔ | ✔ | ✔ | ||||||||||||
concurrentties | ✔ | ✔ | ✔ | ||||||||||||
ctriple | ✔ | ✔ | ✔ | ✔ | |||||||||||
cycle | ✔ | ✔ | ✔ | ||||||||||||
cyclicalties | ✔ | ✔ | ✔ | ✔ | |||||||||||
cyclicalweights | ✔ | ✔ | ✔ | ✔ | |||||||||||
degcor | ✔ | ✔ | |||||||||||||
degcrossprod | ✔ | ✔ | |||||||||||||
degrange | ✔ | ✔ | ✔ | ||||||||||||
degree | ✔ | ✔ | ✔ | ✔ | |||||||||||
degree1.5 | ✔ | ✔ | |||||||||||||
density | ✔ | ✔ | ✔ | ✔ | |||||||||||
diff | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||
dsp | ✔ | ✔ | |||||||||||||
dyadcov | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
edgecov | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||
edges | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
equalto | ✔ | ✔ | ✔ | ✔ | |||||||||||
esp | ✔ | ✔ | |||||||||||||
greaterthan | ✔ | ✔ | ✔ | ✔ | |||||||||||
gwb1degree | ✔ | ✔ | ✔ | ✔ | |||||||||||
gwb1dsp | ✔ | ✔ | ✔ | ✔ | |||||||||||
gwb2degree | ✔ | ✔ | ✔ | ✔ | |||||||||||
gwb2dsp | ✔ | ✔ | ✔ | ✔ | |||||||||||
gwdegree | ✔ | ✔ | ✔ | ✔ | |||||||||||
gwdsp | ✔ | ✔ | |||||||||||||
gwesp | ✔ | ✔ | |||||||||||||
gwidegree | ✔ | ✔ | ✔ | ||||||||||||
gwnsp | ✔ | ✔ | |||||||||||||
gwodegree | ✔ | ✔ | ✔ | ||||||||||||
hamming | ✔ | ✔ | ✔ | ✔ | |||||||||||
idegrange | ✔ | ✔ | ✔ | ||||||||||||
idegree | ✔ | ✔ | ✔ | ✔ | |||||||||||
idegree1.5 | ✔ | ✔ | |||||||||||||
ininterval | ✔ | ✔ | ✔ | ✔ | |||||||||||
intransitive | ✔ | ✔ | ✔ | ||||||||||||
isolatededges | ✔ | ✔ | ✔ | ||||||||||||
isolates | ✔ | ✔ | ✔ | ✔ | |||||||||||
istar | ✔ | ✔ | ✔ | ||||||||||||
kstar | ✔ | ✔ | ✔ | ||||||||||||
localtriangle | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
m2star | ✔ | ✔ | |||||||||||||
meandeg | ✔ | ✔ | ✔ | ✔ | |||||||||||
mm | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||
mutual | ✔ | ✔ | ✔ | ✔ | |||||||||||
nearsimmelian | ✔ | ✔ | ✔ | ||||||||||||
nodecov | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||
nodecovar | ✔ | ✔ | |||||||||||||
nodefactor | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||
nodeicov | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
nodeicovar | ✔ | ✔ | |||||||||||||
nodeifactor | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||
nodematch | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||
nodemix | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||
nodeocov | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
nodeocovar | ✔ | ✔ | |||||||||||||
nodeofactor | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
nsp | ✔ | ✔ | |||||||||||||
odegrange | ✔ | ✔ | ✔ | ||||||||||||
odegree | ✔ | ✔ | ✔ | ✔ | |||||||||||
odegree1.5 | ✔ | ✔ | |||||||||||||
opentriad | ✔ | ✔ | ✔ | ||||||||||||
ostar | ✔ | ✔ | ✔ | ||||||||||||
receiver | ✔ | ✔ | ✔ | ✔ | |||||||||||
sender | ✔ | ✔ | ✔ | ✔ | |||||||||||
simmelian | ✔ | ✔ | ✔ | ||||||||||||
simmelianties | ✔ | ✔ | ✔ | ||||||||||||
smalldiff | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
smallerthan | ✔ | ✔ | ✔ | ✔ | |||||||||||
sociality | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
sum | ✔ | ✔ | ✔ | ||||||||||||
threetrail | ✔ | ✔ | ✔ | ✔ | |||||||||||
transitive | ✔ | ✔ | ✔ | ||||||||||||
transitiveties | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
transitiveweights | ✔ | ✔ | ✔ | ✔ | ✔ | ||||||||||
triadcensus | ✔ | ✔ | ✔ | ✔ | |||||||||||
triangle | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | |||||||||
tripercent | ✔ | ✔ | ✔ | ✔ | |||||||||||
ttriple | ✔ | ✔ | ✔ | ✔ | |||||||||||
twopath | ✔ | ✔ | ✔ |
This table lists full definitions for all of the terms along with their tags. Note that some terms may have multiple versions (e.g. valued vs. binary) with slightly different arguments and will be listed more than once with the same definition.
Description | Categories |
---|---|
B(formula, form) Wrap binary terms for use in valued models: Wraps binary ergm terms for use in valued models, with formula specifying which terms are to be wrapped and form specifying how they are to be used and how the binary network they are evaluated on is to be constructed. |
operator, valued |
Curve(formula, params, map,
gradient=NULL, minpar=-Inf, maxpar=+Inf, cov=NULL) Curve(formula,
params, map, gradient=NULL, minpar=-Inf, maxpar=+Inf,
cov=NULL) If the model in formula is curved, then the outputs of this operator term’s map argument will be used as inputs to the curved terms of the formula model. Curve is an obsolete alias and may be deprecated and removed in a future release. |
operator, binary, valued |
Parametrise(formula, params, map,
gradient=NULL, minpar=-Inf, maxpar=+Inf, cov=NULL) Parametrise(formula,
params, map, gradient=NULL, minpar=-Inf, maxpar=+Inf,
cov=NULL) If the model in formula is curved, then the outputs of this operator term’s map argument will be used as inputs to the curved terms of the formula model. Curve is an obsolete alias and may be deprecated and removed in a future release. |
operator, binary, valued |
Parametrize(formula, params, map,
gradient=NULL, minpar=-Inf, maxpar=+Inf, cov=NULL) Parametrize(formula,
params, map, gradient=NULL, minpar=-Inf, maxpar=+Inf,
cov=NULL) If the model in formula is curved, then the outputs of this operator term’s map argument will be used as inputs to the curved terms of the formula model. Curve is an obsolete alias and may be deprecated and removed in a future release. |
operator, binary, valued |
Exp(formula)
Exp(formula) Exponentiate a network’s statistic: Evaluate the terms specified in formula and exponentiates them with base e . |
operator, binary, valued |
F(formula, filter) Filtering on arbitrary one-term model: Evaluates the given formula on a network constructed by taking y and removing any edges for which f_{i,j}(y_{i,j}) = 0f[i,j] (y[i,j])=0 . |
operator, binary |
For(…) A for operator for terms: This operator evaluates the formula given to it, substituting the specified loop counter variable with each element in a sequence. |
operator, binary |
Label(formula, label, pos)
Label(formula, label, pos) Modify terms’ coefficient names: This operator evaluates formula without modification, but modifies its coefficient and/or parameter names based on label and pos . |
operator, binary, valued |
Log(formula, log0=-1/sqrt(.Machine\(double.eps)) Log(formula,
log0=-1/sqrt(.Machine\)double.eps)) Take a natural logarithm of a network’s statistic: Evaluate the terms specified in formula and takes a natural (base e ) logarithm of them. Since an ERGM statistic must be finite, log0 specifies the value to be substituted for log(0) . The default value seems reasonable for most purposes. |
operator, binary, valued |
NodematchFilter(formula,
attrname) Filtering on nodematch: Evaluates the terms specified in formula on a network constructed by taking y and removing any edges for which attrname(i)!=attrname(j) . |
operator, binary |
Offset(formula, coef,
which) Terms with fixed coefficients: This operator is analogous to the offset() wrapper, but the coefficients are specified within the term and the curved ERGM mechanism is used internally. |
operator, binary |
Prod(formulas, label) Prod(formulas,
label) A product (or an arbitrary power combination) of one or more formulas: This operator evaluates a list of formulas whose corresponnding RHS statistics will be multiplied elementwise. They are required to be nonnegative. |
operator, binary, valued |
S(formula, attrs) Evaluation on an induced subgraph: This operator takes a two-sided forumla attrs whose LHS gives the attribute or attribute function for which tails and heads will be used to construct the induced subgraph. They must evaluate either to a logical vector equal in length to the number of tails (for LHS) and heads (for RHS) indicating which nodes are to be used to induce the subgraph or a numeric vector giving their indices. |
operator, binary |
Sum(formulas, label) Sum(formulas,
label) A sum (or an arbitrary linear combination) of one or more formulas: This operator sums up the RHS statistics of the input formulas elementwise. |
operator, binary, valued |
Symmetrize(formula,
rule=“weak”) |
directed, operator, binary |
absdiff(attr, pow=1) absdiff(attr,
pow=1, form=“sum”) Absolute difference in nodal attribute: This term adds one network statistic to the model equaling the sum of abs(attr[i]-attr[j])^pow for all edges (i,j) in the network. |
directed, dyad-independent, quantitative nodal attribute, undirected, binary, valued |
absdiffcat(attr, base=NULL,
levels=NULL) absdiffcat(attr, base=NULL, levels=NULL,
form=“sum”) Categorical absolute difference in nodal attribute: This term adds one statistic for every possible nonzero distinct value of abs(attr[i]-attr[j]) in the network. The value of each such statistic is the number of edges in the network with the corresponding absolute difference. |
categorical nodal attribute, directed, dyad-independent, undirected, binary, valued |
altkstar(lambda,
fixed=FALSE) Alternating k-star: Add one network statistic to the model equal to a weighted alternating sequence of k-star statistics with weight parameter lambda. |
categorical nodal attribute, curved, undirected, binary |
asymmetric(attr=NULL, diff=FALSE,
keep=NULL, levels=NULL) Asymmetric dyads: This term adds one network statistic to the model equal to the number of pairs of actors for which exactly one of (i{}j)(i,j) or (j{}i)(j,i) exists. |
directed, dyad-independent, triad-related, binary |
atleast(threshold=0) Number of dyads with values greater than or equal to a threshold: Adds the number of statistics equal to the length of threshold equaling to the number of dyads whose values equal or exceed the corresponding element of threshold . |
directed, dyad-independent, undirected, valued |
atmost(threshold=0) Number of dyads with values less than or equal to a threshold: Adds the number of statistics equal to the length of threshold equaling to the number of dyads whose values equal or are exceeded by the corresponding element of threshold . |
directed, dyad-independent, undirected, valued |
attrcov(attr,
mat) |
directed, dyad-independent, undirected, binary |
b1concurrent(by=NULL,
levels=NULL) Concurrent node count for the first mode in a bipartite network: This term adds one network statistic to the model, equal to the number of nodes in the first mode of the network with degree 2 or higher. The first mode of a bipartite network object is sometimes known as the “actor” mode. This term can only be used with undirected bipartite networks. |
bipartite, categorical nodal attribute, undirected, binary |
b1cov(attr) b1cov(attr,
form=“sum”) Main effect of a covariate for the first mode in a bipartite network: This term adds a single network statistic for each quantitative attribute or matrix column to the model equaling the total value of attr(i) for all edges (i,j) in the network. This term may only be used with bipartite networks. For categorical attributes, see b1factor . |
bipartite, dyad-independent, frequently-used, quantitative nodal attribute, undirected, binary, valued |
b1degrange(from,
to= |
bipartite, undirected, binary |
b1degree(d, by=NULL,
levels=NULL) Degree for the first mode in a bipartite network: This term adds one network statistic to the model for each element in d ; the ith such statistic equals the number of nodes of degree d[i] in the first mode of a bipartite network, i.e. with exactly d[i] edges. The first mode of a bipartite network object is sometimes known as the “actor” mode. |
bipartite, categorical nodal attribute, frequently-used, undirected, binary |
b1dsp(d) Dyadwise shared partners for dyads in the first bipartition: This term adds one network statistic to the model for each element in d ; the ith such statistic equals the number of dyads in the first bipartition with exactly d[i] shared partners. (Those shared partners, of course, must be members of the second bipartition.) This term can only be used with bipartite networks. |
bipartite, undirected, binary |
b1factor(attr, base=1, levels=-1)
b1factor(attr, base=1, levels=-1, form=“sum”) Factor attribute effect for the first mode in a bipartite network: This term adds multiple network statistics to the model, one for each of (a subset of) the unique values of the attr attribute. Each of these statistics gives the number of times a node with that attribute in the first mode of the network appears in an edge. The first mode of a bipartite network object is sometimes known as the “actor” mode. |
bipartite, categorical nodal attribute, dyad-independent, frequently-used, undirected, binary, valued |
b1mindegree(d) Minimum degree for the first mode in a bipartite network: This term adds one network statistic to the model for each element in d ; the i th such statistic equals the number of nodes in the first mode of a bipartite network with at least degree d[i] . The first mode of a bipartite network object is sometimes known as the “actor” mode. |
bipartite, undirected, binary |
b1nodematch(attr, diff=FALSE,
keep=NULL, alpha=1, beta=1, byb2attr=NULL,
levels=NULL) Nodal attribute-based homophily effect for the first mode in a bipartite network: This term is introduced in Bomiriya et al (2014). With the default alpha and beta values, this term will simply be a homophily based two-star statistic. This term adds one statistic to the model unless diff is set to TRUE , in which case the term adds multiple network statistics to the model, one for each of (a subset of) the unique values of the attr attribute. |
bipartite, categorical nodal attribute, dyad-independent, frequently-used, undirected, binary |
b1sociality(nodes=-1)
b1sociality(nodes=-1, form=“sum”) Degree: This term adds one network statistic for each node in the first bipartition, equal to the number of ties of that node. This term can only be used with bipartite networks. For directed networks, see sender and receiver. For unipartite networks, see sociality. |
bipartite, dyad-independent, undirected, binary, valued |
b1star(k, attr=NULL,
levels=NULL) k-stars for the first mode in a bipartite network: This term adds one network statistic to the model for each element in k . The i th such statistic counts the number of distinct k[i] -stars whose center node is in the first mode of the network. The first mode of a bipartite network object is sometimes known as the “actor” mode. A k -star is defined to be a center node N and a set of k different nodes {O_1, , O_k}{O[1], …, O[k]} such that the ties {N, O_i}{N, O[i]} exist for i=1, , k. This term can only be used for undirected bipartite networks. |
bipartite, categorical nodal attribute, undirected, binary |
b1starmix(k, attr, base=NULL,
diff=TRUE) Mixing matrix for k-stars centered on the first mode of a bipartite network: This term counts all k-stars in which the b2 nodes (called events in some contexts) are homophilous in the sense that they all share the same value of attr . However, the b1 node (in some contexts, the actor) at the center of the k-star does NOT have to have the same value as the b2 nodes; indeed, the values taken by the b1 nodes may be completely distinct from those of the b2 nodes, which allows for the use of this term in cases where there are two separate nodal attributes, one for the b1 nodes and another for the b2 nodes (in this case, however, these two attributes should be combined to form a single nodal attribute, attr). A different statistic is created for each value of attr seen in a b1 node, even if no k-stars are observed with this value. |
bipartite, categorical nodal attribute, undirected, binary |
b1twostar(b1attr, b2attr, base=NULL,
b1levels=NULL, b2levels=NULL, levels2=NULL) Two-star census for central nodes centered on the first mode of a bipartite network: This term takes two nodal attributes. Assuming that there are n_1 values of b1attr among the b1 nodes and n_2 values of b2attr among the b2 nodes, then the total number of distinct categories of two stars according to these two attributes is n_1(n_2)(n_2+1)/2. By default, this model term creates a distinct statistic counting each of these categories. |
bipartite, categorical nodal attribute, undirected, binary |
b2concurrent(by=NULL) Concurrent node count for the second mode in a bipartite network: This term adds one network statistic to the model, equal to the number of nodes in the second mode of the network with degree 2 or higher. The second mode of a bipartite network object is sometimes known as the “event” mode. Without the optional argument, this statistic is equivalent to b2mindegree(2). |
bipartite, frequently-used, undirected, binary |
b2cov(attr) b2cov(attr,
form=“sum”) Main effect of a covariate for the second mode in a bipartite network: This term adds a single network statistic for each quantitative attribute or matrix column to the model equaling the total value of attr(j) for all edges (i,j) in the network. This term may only be used with bipartite networks. For categorical attributes, see b2factor. |
bipartite, dyad-independent, frequently-used, quantitative nodal attribute, undirected, binary, valued |
b2degrange(from, to=+Inf,
by=NULL, homophily=FALSE, levels=NULL) |
bipartite, undirected, binary |
b2degree(d,
by=NULL) Degree for the second mode in a bipartite network: This term adds one network statistic to the model for each element in d ; the i th such statistic equals the number of nodes of degree d[i] in the second mode of a bipartite network, i.e. with exactly d[i] edges. The second mode of a bipartite network object is sometimes known as the “event” mode. |
bipartite, categorical nodal attribute, frequently-used, undirected, binary |
b2dsp(d) Dyadwise shared partners for dyads in the second bipartition: This term adds one network statistic to the model for each element in d ; the i th such statistic equals the number of dyads in the second bipartition with exactly d[i] shared partners. (Those shared partners, of course, must be members of the first bipartition.) This term can only be used with bipartite networks. |
bipartite, undirected, binary |
b2factor(attr, base=1, levels=-1)
b2factor(attr, base=1, levels=-1, form=“sum”) Factor attribute effect for the second mode in a bipartite network: This term adds multiple network statistics to the model, one for each of (a subset of) the unique values of the attr attribute. Each of these statistics gives the number of times a node with that attribute in the second mode of the network appears in an edge. The second mode of a bipartite network object is sometimes known as the “event” mode. |
bipartite, categorical nodal attribute, dyad-independent, frequently-used, undirected, binary, valued |
b2mindegree(d) Minimum degree for the second mode in a bipartite network: This term adds one network statistic to the model for each element in d ; the i th such statistic equals the number of nodes in the second mode of a bipartite network with at least degree d[i] . The second mode of a bipartite network object is sometimes known as the “event” mode. |
bipartite, undirected, binary |
b2nodematch(attr, diff=FALSE,
keep=NULL, alpha=1, beta=1, byb1attr=NULL,
levels=NULL) Nodal attribute-based homophily effect for the second mode in a bipartite network: This term is introduced in Bomiriya et al (2014). With the default alpha and beta values, this term will simply be a homophily based two-star statistic. This term adds one statistic to the model unless diff is set to TRUE , in which case the term adds multiple network statistics to the model, one for each of (a subset of) the unique values of the attr attribute. |
bipartite, categorical nodal attribute, dyad-independent, frequently-used, undirected, binary |
b2sociality(nodes=-1)
b2sociality(nodes=-1, form=“sum”) Degree: This term adds one network statistic for each node in the second bipartition, equal to the number of ties of that node. For directed networks, see sender and receiver . For unipartite networks, see sociality . |
bipartite, dyad-independent, undirected, binary, valued |
b2star(k, attr=NULL,
levels=NULL) k-stars for the second mode in a bipartite network: This term adds one network statistic to the model for each element in k . The i th such statistic counts the number of distinct k[i] -stars whose center node is in the second mode of the network. The second mode of a bipartite network object is sometimes known as the “event” mode. A k -star is defined to be a center node N and a set of k different nodes {O_1, , O_k}{O[1], …, O[k]} such that the ties {N, O_i} exist for i=1, , k . This term can only be used for undirected bipartite networks. |
bipartite, categorical nodal attribute, undirected, binary |
b2starmix(k, attr, base=NULL,
diff=TRUE) Mixing matrix for k-stars centered on the second mode of a bipartite network: This term is exactly the same as b1starmix except that the roles of b1 and b2 are reversed. |
bipartite, categorical nodal attribute, undirected, binary |
b2twostar(b1attr, b2attr, base=NULL,
b1levels=NULL, b2levels=NULL, levels2=NULL) Two-star census for central nodes centered on the second mode of a bipartite network: This term is exactly the same as b1twostar except that the roles of b1 and b2 are reversed. |
bipartite, categorical nodal attribute, undirected, binary |
balance Balanced triads: This term adds one network statistic to the model equal to the number of triads in the network that are balanced. The balanced triads are those of type 102 or 300 in the categorization of Davis and Leinhardt (1972). For details on the 16 possible triad types, see ?triad.classify in the {sna} package. For an undirected network, the balanced triads are those with an odd number of ties (i.e., 1 and 3). |
directed, triad-related, undirected, binary |
coincidence(levels=NULL,active=0) Coincident node count for the second mode in a bipartite (aka two-mode) network: By default this term adds one network statistic to the model for each pair of nodes of mode two. It is equal to the number of (first mode) mutual partners of that pair. The first mode of a bipartite network object is sometimes known as the “actor” mode and the seconds as the “event” mode. So this is the number of actors going to both events in the pair. This term can only be used with undirected bipartite networks. |
bipartite, undirected, binary |
concurrent(by=NULL,
levels=NULL) Concurrent node count: This term adds one network statistic to the model, equal to the number of nodes in the network with degree 2 or higher. This term can only be used with undirected networks. |
categorical nodal attribute, undirected, binary |
concurrentties(by=NULL,
levels=NULL) Concurrent tie count: This term adds one network statistic to the model, equal to the number of ties incident on each actor beyond the first. This term can only be used with undirected networks. |
categorical nodal attribute, undirected, binary |
ctriple(attr=NULL, diff=FALSE,
levels=NULL) Cyclic triples: By default, this term adds one statistic to the model, equal to the number of cyclic triples in the network, defined as a set of edges of the form {(i{}j), (j{}k), (k{}i)}{(i,j), (j,k), (k,i)} . |
categorical nodal attribute, directed, triad-related, binary |
ctriad Cyclic triples: By default, this term adds one statistic to the model, equal to the number of cyclic triples in the network, defined as a set of edges of the form {(i{}j), (j{}k), (k{}i)}{(i,j), (j,k), (k,i)} . |
categorical nodal attribute, directed, triad-related, binary |
cycle(k,
semi=FALSE) |
directed, undirected, binary |
cyclicalties(attr=NULL,
levels=NULL) cyclicalties(threshold=0) Cyclical ties: This term adds one statistic, equal to the number of ties iji–>j such that there exists a two-path from j to i . (Related to the ttriple term.) |
directed, undirected, binary, valued |
cyclicalweights(twopath=“min”,
combine=“max”, affect=“min”) Cyclical weights: This statistic implements the cyclical weights statistic, like that defined by Krivitsky (2012), Equation 13, but with the focus dyad being y_{j,i} rather than y_{i,j} . For each option, the first (and the default) is more stable but also more conservative, while the second is more sensitive but more likely to induce a multimodal distribution of networks. |
directed, nonnegative, undirected, valued |
degcor Degree Correlation: This term adds one network statistic equal to the correlation of the degrees of all pairs of nodes in the network which are tied. Only coded for undirected networks. |
undirected, binary |
degcrossprod Degree Cross-Product: This term adds one network statistic equal to the mean of the cross-products of the degrees of all pairs of nodes in the network which are tied. Only coded for undirected networks. |
undirected, binary |
degrange(from, to=+Inf, by=NULL,
homophily=FALSE, levels=NULL) Degree range: This term adds one network statistic to the model for each element of from (or to ); the i th such statistic equals the number of nodes in the network of degree greater than or equal to from[i] but strictly less than to[i] , i.e. with edges in semiopen interval [from,to) . |
categorical nodal attribute, undirected, binary |
degree(d, by=NULL, homophily=FALSE,
levels=NULL) Degree: This term adds one network statistic to the model for each element in d ; the i th such statistic equals the number of nodes in the network of degree d[i] , i.e. with exactly d[i] edges. This term can only be used with undirected networks; for directed networks see idegree and odegree . |
categorical nodal attribute, frequently-used, undirected, binary |
degree1.5 Degree to the 3/2 power: This term adds one network statistic to the model equaling the sum over the actors of each actor’s degree taken to the 3/2 power (or, equivalently, multiplied by its square root). This term is an undirected analog to the terms of Snijders et al. (2010), equations (11) and (12). This term can only be used with undirected networks. |
undirected, binary |
density Density: This term adds one network statistic equal to the density of the network. For undirected networks, density equals kstar(1) or edges divided by n(n-1)/2 ; for directed networks, density equals edges or istar(1) or ostar(1) divided by n(n-1) . |
directed, dyad-independent, undirected, binary |
diff(attr, pow=1, dir=“t-h”,
sign.action=“identity”) diff(attr, pow=1, dir=“t-h”,
sign.action=“identity”, form =“sum”) |
bipartite, directed, dyad-independent, frequently-used, quantitative nodal attribute, undirected, binary, valued |
ddsp(d, type=“OTP”) Directed dyadwise shared partners: This term adds one network statistic to the model for each element in d where the i th such statistic equals the number of dyads in the network with exactly d[i] shared partners. |
directed, binary |
dsp(d, type=“OTP”) Directed dyadwise shared partners: This term adds one network statistic to the model for each element in d where the i th such statistic equals the number of dyads in the network with exactly d[i] shared partners. |
directed, binary |
dyadcov(x,
attrname=NULL) Dyadic covariate: This term adds three statistics to the model, each equal to the sum of the covariate values for all dyads occupying one of the three possible non-empty dyad states (mutual, upper-triangular asymmetric, and lower-triangular asymmetric dyads, respectively), with the empty or null state serving as a reference category. If the network is undirected, x is either a matrix of edgewise covariates, or a network; if the latter, optional argument attrname provides the name of the edge attribute to use for edge values. This term adds one statistic to the model, equal to the sum of the covariate values for each edge appearing in the network. The edgecov and dyadcov terms are equivalent for undirected networks. |
directed, dyad-independent, quantitative dyadic attribute, undirected, binary |
edgecov(x, attrname=NULL) edgecov(x,
attrname=NULL, form=“sum”) Edge covariate: This term adds one statistic to the model, equal to the sum of the covariate values for each edge appearing in the network. The edgecov term applies to both directed and undirected networks. For undirected networks the covariates are also assumed to be undirected. The edgecov and dyadcov terms are equivalent for undirected networks. |
directed, dyad-independent, frequently-used, quantitative dyadic attribute, undirected, binary, valued |
edges edges Number of edges in the network: This term adds one network statistic equal to the number of edges (i.e. nonzero values) in the network. For undirected networks, edges is equal to kstar(1); for directed networks, edges is equal to both ostar(1) and istar(1). |
directed, dyad-independent, undirected, binary, valued |
nonzero Number of edges in the network: This term adds one network statistic equal to the number of edges (i.e. nonzero values) in the network. For undirected networks, edges is equal to kstar(1); for directed networks, edges is equal to both ostar(1) and istar(1). |
directed, dyad-independent, undirected, binary, valued |
equalto(value=0,
tolerance=0) Number of dyads with values equal to a specific value (within tolerance): Adds one statistic equal to the number of dyads whose values are within tolerance of value , i.e., between value-tolerance and value+tolerance , inclusive. |
directed, dyad-independent, undirected, valued |
desp(d, type=“OTP”) Directed edgewise shared partners: This term adds one network statistic to the model for each element in d where the i th such statistic equals the number of edges in the network with exactly d[i] shared partners. |
directed, binary |
esp(d, type=“OTP”) Directed edgewise shared partners: This term adds one network statistic to the model for each element in d where the i th such statistic equals the number of edges in the network with exactly d[i] shared partners. |
directed, binary |
greaterthan(threshold=0) Number of dyads with values strictly greater than a threshold: Adds the number of statistics equal to the length of threshold equaling to the number of dyads whose values exceed the corresponding element of threshold . |
directed, dyad-independent, undirected, valued |
gwb1degree(decay, fixed=FALSE,
attr=NULL, cutoff=30, levels=NULL) |
bipartite, curved, undirected, binary |
gwb1dsp(decay=0, fixed=FALSE,
cutoff=30) Geometrically weighted dyadwise shared partner distribution for dyads in the first bipartition: This term adds one network statistic to the model equal to the geometrically weighted dyadwise shared partner distribution for dyads in the first bipartition with decay parameter decay parameter, which should be non-negative. This term can only be used with bipartite networks. |
bipartite, curved, undirected, binary |
gwb2degree(decay, fixed=FALSE,
attr=NULL, cutoff=30, levels=NULL) Geometrically weighted degree distribution for the second mode in a bipartite network: This term adds one network statistic to the model equal to the weighted degree distribution with decay controlled by the which should be non-negative, for nodes in the second mode of a bipartite network. The second mode of a bipartite network object is sometimes known as the “event” mode. |
bipartite, curved, undirected, binary |
gwb2dsp(decay=0, fixed=FALSE,
cutoff=30) Geometrically weighted dyadwise shared partner distribution for dyads in the second bipartition: This term adds one network statistic to the model equal to the geometrically weighted dyadwise shared partner distribution for dyads in the second bipartition with decay parameter decay parameter, which should be non-negative. This term can only be used with bipartite networks. |
bipartite, curved, undirected, binary |
gwdegree(decay, fixed=FALSE,
attr=NULL, cutoff=30, levels=NULL) Geometrically weighted degree distribution: This term adds one network statistic to the model equal to the weighted degree distribution with decay controlled by the decay parameter, which should be non-negative. |
curved, frequently-used, undirected, binary |
dgwdsp(decay, fixed=FALSE, cutoff=30,
type=“OTP”) Geometrically weighted dyadwise shared partner distribution: This term adds one network statistic to the model equal to the geometrically weighted dyadwise shared partner distribution with decay parameter decay parameter. |
directed, binary |
gwdsp(decay, fixed=FALSE, cutoff=30,
type=“OTP”) Geometrically weighted dyadwise shared partner distribution: This term adds one network statistic to the model equal to the geometrically weighted dyadwise shared partner distribution with decay parameter decay parameter. |
directed, binary |
dgwesp(decay, fixed=FALSE, cutoff=30,
type=“OTP”) Geometrically weighted edgewise shared partner distribution: This term adds a statistic equal to the geometrically weighted edgewise (not dyadwise) shared partner distribution with decay parameter decay parameter. |
directed, binary |
gwesp(decay, fixed=FALSE, cutoff=30,
type=“OTP”) Geometrically weighted edgewise shared partner distribution: This term adds a statistic equal to the geometrically weighted edgewise (not dyadwise) shared partner distribution with decay parameter decay parameter. |
directed, binary |
gwidegree(decay, fixed=FALSE,
attr=NULL, cutoff=30, levels=NULL) Geometrically weighted in-degree distribution: This term adds one network statistic to the model equal to the weighted in-degree distribution with decay parameter decay parameter, which should be non-negative. This term can only be used with directed networks. |
curved, directed, binary |
dgwnsp(decay, fixed=FALSE, cutoff=30,
type=“OTP”) Geometrically weighted non-edgewise shared partner distribution: This term is just like gwesp and gwdsp except it adds a statistic equal to the geometrically weighted nonedgewise (that is, over dyads that do not have an edge) shared partner distribution with decay parameter decay parameter. |
directed, binary |
gwnsp(decay, fixed=FALSE, cutoff=30,
type=“OTP”) Geometrically weighted non-edgewise shared partner distribution: This term is just like gwesp and gwdsp except it adds a statistic equal to the geometrically weighted nonedgewise (that is, over dyads that do not have an edge) shared partner distribution with decay parameter decay parameter. |
directed, binary |
gwodegree(decay, fixed=FALSE,
attr=NULL, cutoff=30, levels=NULL) Geometrically weighted out-degree distribution: This term adds one network statistic to the model equal to the weighted out-degree distribution with decay parameter decay parameter, which should be non-negative. This term can only be used with directed networks. |
curved, directed, binary |
hamming(x, cov,
attrname=NULL) Hamming distance: This term adds one statistic to the model equal to the weighted or unweighted Hamming distance of the network from the network specified by x . Unweighted Hamming distance is defined as the total number of pairs (i,j) (ordered or unordered, depending on whether the network is directed or undirected) on which the two networks differ. If the optional argument cov is specified, then the weighted Hamming distance is computed instead, where each pair (i,j) contributes a pre-specified weight toward the distance when the two networks differ on that pair. |
directed, dyad-independent, undirected, binary |
idegrange(from, to=+Inf, by=NULL,
homophily=FALSE, levels=NULL) |
categorical nodal attribute, directed, binary |
idegree(d, by=NULL, homophily=FALSE,
levels=NULL) In-degree: This term adds one network statistic to the model for each element in d ; the i th such statistic equals the number of nodes in the network of in-degree d[i] , i.e. the number of nodes with exactly d[i] in-edges. This term can only be used with directed networks; for undirected networks see degree . |
categorical nodal attribute, directed, frequently-used, binary |
idegree1.5 In-degree to the 3/2 power: This term adds one network statistic to the model equaling the sum over the actors of each actor’s indegree taken to the 3/2 power (or, equivalently, multiplied by its square root). This term is analogous to the term of Snijders et al. (2010), equation (12). This term can only be used with directed networks. |
directed, binary |
ininterval(lower=-Inf, upper=+Inf,
open=c(TRUE,TRUE)) Number of dyads whose values are in an interval: Adds one statistic equaling to the number of dyads whose values are between lower and upper . |
directed, dyad-independent, undirected, valued |
intransitive Intransitive triads: This term adds one statistic to the model, equal to the number of triads in the network that are intransitive. The intransitive triads are those of type 111D , 201 , 111U , 021C , or 030C in the categorization of Davis and Leinhardt (1972). For details on the 16 possible triad types, see triad.classify in the snahttps://CRAN.R-project.org/package=snasna package. Note the distinction from the ctriple term. |
directed, triad-related, binary |
isolatededges Isolated edges: This term adds one statistic to the model equal to the number of isolated edges in the network, i.e., the number of edges each of whose endpoints has degree 1. This term can only be used with undirected networks. |
bipartite, undirected, binary |
isolates Isolates: This term adds one statistic to the model equal to the number of isolates in the network. For an undirected network, an isolate is defined to be any node with degree zero. For a directed network, an isolate is any node with both in-degree and out-degree equal to zero. |
directed, frequently-used, undirected, binary |
istar(k, attr=NULL,
levels=NULL) In-stars: This term adds one network statistic to the model for each element in k . The i th such statistic counts the number of distinct k[i] -instars in the network, where a k -instar is defined to be a node N and a set of k different nodes {O_1, , O_k}{O[1], …, O[k]} such that the ties (O_j{}N)(O_j, N) exist for j=1, , k . This term can only be used for directed networks; for undirected networks see kstar . Note that istar(1) is equal to both ostar(1) and edges . |
categorical nodal attribute, directed, binary |
kstar(k, attr=NULL,
levels=NULL) k-stars: This term adds one network statistic to the model for each element in k . The i th such statistic counts the number of distinct k[i] -stars in the network, where a k -star is defined to be a node N and a set of k different nodes {O_1, , O_k}{O[1], …, O[k]} such that the ties {N, O_i}{N, O[i]} exist for i=1, , k . This term can only be used for undirected networks; for directed networks, see istar , ostar , twopath and m2star . Note that kstar(1) is equal to edges . |
categorical nodal attribute, undirected, binary |
localtriangle(x) Triangles within neighborhoods: This term adds one statistic to the model equal to the number of triangles in the network between nodes “close to” each other. For an undirected network, a local triangle is defined to be any set of three edges between nodal pairs {(i,j), (j,k), (k,i)} that are in the same neighborhood. For a directed network, a triangle is defined as any set of three edges (i{}j), (j{}k)(i,j), (j,k) and either (k{}i) or (k{}i) where again all nodes are within the same neighborhood. |
categorical dyadic attribute, directed, triad-related, undirected, binary |
m2star Mixed 2-stars, a.k.a 2-paths: This term adds one statistic to the model, equal to the number of mixed 2-stars in the network, where a mixed 2-star is a pair of distinct edges (i{}j), (j{}k)(i,j), (j,k) . A mixed 2-star is sometimes called a 2-path because it is a directed path of length 2 from i to k via j . However, in the case of a 2-path the focus is usually on the endpoints i and k , whereas for a mixed 2-star the focus is usually on the midpoint j . This term can only be used with directed networks; for undirected networks see kstar(2) . See also twopath . |
directed, binary |
meandeg Mean vertex degree: This term adds one network statistic to the model equal to the average degree of a node. Note that this term is a constant multiple of both edges and density . |
directed, dyad-independent, undirected, binary |
mm(attrs, levels=NULL, levels2=-1)
mm(attrs, levels=NULL, levels2=-1, form=“sum”) Mixing matrix cells and margins: attrs is the rows of the mixing matrix and whose RHS gives that for its columns. A one-sided formula (e.g., ~A ) is symmetrized (e.g., A~A ). A two-sided formula with a dot on one side calculates the margins of the mixing matrix, analogously to nodefactor , with A~. calculating the row/sender/b1 margins and .~A calculating the column/receiver/b2 margins. |
categorical nodal attribute, directed, dyad-independent, frequently-used, undirected, binary, valued |
mutual(same=NULL, by=NULL,
diff=FALSE, keep=NULL, levels=NULL)
mutual(form=“min”,threshold=0) |
directed, frequently-used, binary, valued |
nearsimmelian Near simmelian triads: This term adds one statistic to the model equal to the number of near Simmelian triads, as defined by Krackhardt and Handcock (2007). This is a sub-graph of size three which is exactly one tie short of being complete. |
directed, triad-related, binary |
nodecov(attr) nodecov(attr,
form=“sum”) Main effect of a covariate: This term adds a single network statistic for each quantitative attribute or matrix column to the model equaling the sum of attr(i) and attr(j) for all edges (i,j) in the network. For categorical attributes, see nodefactor . Note that for directed networks, nodecov equals nodeicov plus nodeocov . |
directed, dyad-independent, frequently-used, quantitative nodal attribute, undirected, binary, valued |
nodemain nodemain(attr,
form=“sum”) Main effect of a covariate: This term adds a single network statistic for each quantitative attribute or matrix column to the model equaling the sum of attr(i) and attr(j) for all edges (i,j) in the network. For categorical attributes, see nodefactor . Note that for directed networks, nodecov equals nodeicov plus nodeocov . |
directed, dyad-independent, frequently-used, quantitative nodal attribute, undirected, binary, valued |
nodecovar(center,
transform) Covariance of undirected dyad values incident on each actor: This term adds one statistic equal to {i,j<k} y{i,j}y_{i,k}/(n-2) . This can be viewed as a valued analog of the star(2) statistic. |
directed, valued |
nodefactor(attr, base=1, levels=-1)
nodefactor(attr, base=1, levels=-1, form=“sum”) Factor attribute effect: This term adds multiple network statistics to the model, one for each of (a subset of) the unique values of the attr attribute (or each combination of the attributes given). Each of these statistics gives the number of times a node with that attribute or those attributes appears in an edge in the network. |
categorical nodal attribute, directed, dyad-independent, frequently-used, undirected, binary, valued |
nodeicov(attr) nodeicov(attr,
form=“sum”) Main effect of a covariate for in-edges: This term adds a single network statistic for each quantitative attribute or matrix column to the model equaling the total value of attr(j) for all edges (i,j) in the network. This term may only be used with directed networks. For categorical attributes, see nodeifactor . |
directed, frequently-used, quantitative nodal attribute, binary, valued |
nodeicovar(center,
transform) Covariance of in-dyad values incident on each actor: This term adds one statistic equal to {i,j,k} y{j,i}y_{k,i}/(n-2) . This can be viewed as a valued analog of the istar(2) statistic. |
directed, valued |
nodeifactor(attr, base=1,
levels=-1) nodeifactor(attr, base=1, levels=-1,
form=“sum”) |
categorical nodal attribute, directed, dyad-independent, frequently-used, binary, valued |
nodematch(attr, diff=FALSE,
keep=NULL, levels=NULL) nodematch(attr, diff=FALSE, keep=NULL,
levels=NULL, form=“sum”) |
categorical nodal attribute, directed, dyad-independent, frequently-used, undirected, binary, valued |
match(attr, diff=FALSE,
keep=NULL, levels=NULL, form=“sum”) |
categorical nodal attribute, directed, dyad-independent, frequently-used, undirected, binary, valued |
nodemix(attr, base=NULL,
b1levels=NULL, b2levels=NULL, levels=NULL, levels2=-1) nodemix(attr,
base=NULL, b1levels=NULL, b2levels=NULL, levels=NULL, levels2=-1,
form=“sum”) Nodal attribute mixing: By default, this term adds one network statistic to the model for each possible pairing of attribute values. The statistic equals the number of edges in the network in which the nodes have that pairing of values. (When multiple attributes are specified, a statistic is added for each combination of attribute values for those attributes.) In other words, this term produces one statistic for every entry in the mixing matrix for the attribute(s). By default, the ordering of the attribute values is lexicographic: alphabetical (for nominal categories) or numerical (for ordered categories). |
categorical nodal attribute, directed, dyad-independent, frequently-used, undirected, binary, valued |
nodeocov(attr) nodeocov(attr,
form=“sum”) Main effect of a covariate for out-edges: This term adds a single network statistic for each quantitative attribute or matrix column to the model equaling the total value of attr(i) for all edges (i,j) in the network. This term may only be used with directed networks. For categorical attributes, see nodeofactor . |
directed, dyad-independent, quantitative nodal attribute, binary, valued |
nodeocovar(center,
transform) Covariance of out-dyad values incident on each actor: This term adds one statistic equal to {i,j,k} y{i,j}y_{i,k}/(n-2) . This can be viewed as a valued analog of the ostar(2) statistic. |
directed, valued |
nodeofactor(attr, base=1,
levels=-1) nodeofactor(attr, base=1, levels=-1,
form=“sum”) Factor attribute effect for out-edges: This term adds multiple network statistics to the model, one for each of (a subset of) the unique values of the attr attribute (or each combination of the attributes given). Each of these statistics gives the number of times a node with that attribute or those attributes appears as the node of origin of a directed tie. |
categorical nodal attribute, directed, dyad-independent, binary, valued |
dnsp(d, type=“OTP”) Directed non-edgewise shared partners: This term adds one network statistic to the model for each element in d where the i th such statistic equals the number of non-edges in the network with exactly d[i] shared partners. |
directed, binary |
nsp(d, type=“OTP”) Directed non-edgewise shared partners: This term adds one network statistic to the model for each element in d where the i th such statistic equals the number of non-edges in the network with exactly d[i] shared partners. |
directed, binary |
odegrange(from, to=+Inf, by=NULL,
homophily=FALSE, levels=NULL) |
categorical nodal attribute, directed, binary |
odegree(d, by=NULL, homophily=FALSE,
levels=NULL) Out-degree: This term adds one network statistic to the model for each element in d ; the i th such statistic equals the number of nodes in the network of out-degree d[i] , i.e. the number of nodes with exactly d[i] out-edges. This term can only be used with directed networks; for undirected networks see degree . |
categorical nodal attribute, directed, frequently-used, binary |
odegree1.5 Out-degree to the 3/2 power: This term adds one network statistic to the model equaling the sum over the actors of each actor’s outdegree taken to the 3/2 power (or, equivalently, multiplied by its square root). This term is analogous to the term of Snijders et al. (2010), equation (12). This term can only be used with directed networks. |
directed, binary |
opentriad Open triads: This term adds one statistic to the model equal to the number of 2-stars minus three times the number of triangles in the network. It is currently only implemented for undirected networks. |
triad-related, undirected, binary |
ostar(k, attr=NULL,
levels=NULL) k-Outstars: This term adds one network statistic to the model for each element in k . The i th such statistic counts the number of distinct k[i] -outstars in the network, where a k -outstar is defined to be a node N and a set of k different nodes {O_1, , O_k}{O[1], …, O[k]} such that the ties (N{}O_j)(N,O_j) exist for j=1, , k . This term can only be used with directed networks; for undirected networks see kstar . |
categorical nodal attribute, directed, binary |
receiver(base=1, nodes=-1)
receiver(base=1, nodes=-1, form=“sum”) Receiver effect: This term adds one network statistic for each node equal to the number of in-ties for that node. This measures the popularity of the node. The term for the first node is omitted by default because of linear dependence that arises if this term is used together with edges , but its coefficient can be computed as the negative of the sum of the coefficients of all the other actors. That is, the average coefficient is zero, following the Holland-Leinhardt parametrization of the \(p_1\) model (Holland and Leinhardt, 1981). This term can only be used with directed networks. For undirected networks, see sociality . |
directed, dyad-independent, binary, valued |
sender(base=1, nodes=-1)
sender(base=1, nodes=-1, form=“sum”) |
directed, dyad-independent, binary, valued |
simmelian Simmelian triads: This term adds one statistic to the model equal to the number of Simmelian triads, as defined by Krackhardt and Handcock (2007). This is a complete sub-graph of size three. |
directed, triad-related, binary |
simmelianties Ties in simmelian triads: This term adds one statistic to the model equal to the number of ties in the network that are associated with Simmelian triads, as defined by Krackhardt and Handcock (2007). Each Simmelian has six ties in it but, because Simmelians can overlap in terms of nodes (and associated ties), the total number of ties in these Simmelians is less than six times the number of Simmelians. Hence this is a measure of the clustering of Simmelians (given the number of Simmelians). |
directed, triad-related, binary |
smalldiff(attr,
cutoff) Number of ties between actors with similar attribute values: This term adds one statistic, having as its value the number of edges in the network for which the incident actors’ attribute values differ less than cutoff ; that is, number of edges between i to j such that abs(attr[i]-attr[j])<cutoff . |
directed, dyad-independent, quantitative nodal attribute, undirected, binary |
smallerthan(threshold=0) Number of dyads with values strictly smaller than a threshold: Adds the number of statistics equal to the length of threshold equaling to the number of dyads whose values are exceeded by the corresponding element of threshold . |
directed, dyad-independent, undirected, valued |
sociality(attr=NULL, base=1,
levels=NULL, nodes=-1) sociality(attr=NULL, base=1, levels=NULL,
nodes=-1, form=“sum”) Undirected degree: This term adds one network statistic for each node equal to the number of ties of that node. For directed networks, see sender and receiver . |
categorical nodal attribute, dyad-independent, undirected, binary, valued |
sum(pow=1) Sum of dyad values (optionally taken to a power): This term adds one statistic equal to the sum of dyad values taken to the power pow. |
directed, undirected, valued |
threetrail(keep=NULL,
levels=NULL) Three-trails: For an undirected network, this term adds one statistic equal to the number of 3-trails, where a 3-trail is defined as a trail of length three that traverses three distinct edges. Note that a 3-trail need not include four distinct nodes; in particular, a triangle counts as three 3-trails. For a directed network, this term adds four statistics (or some subset of these four), one for each of the four distinct types of directed three-paths. If the nodes of the path are written from left to right such that the middle edge points to the right (R), then the four types are RRR, RRL, LRR, and LRL. That is, an RRR 3-trail is of the form ijkli–>j–>k–>l , and RRL 3-trail is of the form ijkli–>j–>k<–l , etc. Like in the undirected case, there is no requirement that the nodes be distinct in a directed 3-trail. However, the three edges must all be distinct. Thus, a mutual tie iji<–>j does not count as a 3-trail of the form ijiji–>j–>i<–j ; however, in the subnetwork ij ki<–>j–>k , there are two directed 3-trails, one LRR ( kjijk<–j–>i–>j ) and one RRR ( jijkk<–j–>i–>j ). |
directed, triad-related, undirected, binary |
threepath(keep=NULL,
levels=NULL) Three-trails: For an undirected network, this term adds one statistic equal to the number of 3-trails, where a 3-trail is defined as a trail of length three that traverses three distinct edges. Note that a 3-trail need not include four distinct nodes; in particular, a triangle counts as three 3-trails. For a directed network, this term adds four statistics (or some subset of these four), one for each of the four distinct types of directed three-paths. If the nodes of the path are written from left to right such that the middle edge points to the right (R), then the four types are RRR, RRL, LRR, and LRL. That is, an RRR 3-trail is of the form ijkli–>j–>k–>l , and RRL 3-trail is of the form ijkli–>j–>k<–l , etc. Like in the undirected case, there is no requirement that the nodes be distinct in a directed 3-trail. However, the three edges must all be distinct. Thus, a mutual tie iji<–>j does not count as a 3-trail of the form ijiji–>j–>i<–j ; however, in the subnetwork ij ki<–>j–>k , there are two directed 3-trails, one LRR ( kjijk<–j–>i–>j ) and one RRR ( jijkk<–j–>i–>j ). |
directed, triad-related, undirected, binary |
transitive Transitive triads: This term adds one statistic to the model, equal to the number of triads in the network that are transitive. The transitive triads are those of type 120D , 030T , 120U , or 300 in the categorization of Davis and Leinhardt (1972). For details on the 16 possible triad types, see ?triad.classify in the snahttps://CRAN.R-project.org/package=snasna package. Note the distinction from the ttriple term. This term can only be used with directed networks. |
directed, triad-related, binary |
transitiveties(attr=NULL,
levels=NULL) Transitive ties: This term adds one statistic, equal to the number of ties iji–>j such that there exists a two-path from i to j . (Related to the ttriple term.) |
categorical nodal attribute, directed, triad-related, undirected, binary |
transitiveweights(twopath=“min”,
combine=“max”, affect=“min”) Transitive weights: This statistic implements the transitive weights statistic defined by Krivitsky (2012), Equation 13. For each of these options, the first (and the default) is more stable but also more conservative, while the second is more sensitive but more likely to induce a multimodal distribution of networks. |
directed, nonnegative, triad-related, undirected, valued |
triadcensus(levels) Triad census: For a directed network, this term adds one network statistic for each of an arbitrary subset of the 16 possible types of triads categorized by Davis and Leinhardt (1972) as 003, 012, 102, 021D, 021U, 021C, 111D, 111U, 030T, 030C, 201, 120D, 120U, 120C, 210, and 300 . Note that at least one category should be dropped; otherwise a linear dependency will exist among the 16 statistics, since they must sum to the total number of three-node sets. By default, the category 003 , which is the category of completely empty three-node sets, is dropped. This is considered category zero, and the others are numbered 1 through 15 in the order given above. Each statistic is the count of the corresponding triad type in the network. For details on the 16 types, see ?triad.classify in the snahttps://CRAN.R-project.org/package=snasna package, on which this code is based. For an undirected network, the triad census is over the four types defined by the number of ties (i.e., 0, 1, 2, and 3). |
directed, triad-related, undirected, binary |
triangle(attr=NULL, diff=FALSE,
levels=NULL) triangles(attr=NULL, diff=FALSE,
levels=NULL) Triangles: By default, this term adds one statistic to the model equal to the number of triangles in the network. For an undirected network, a triangle is defined to be any set {(i,j), (j,k), (k,i)} of three edges. For a directed network, a triangle is defined as any set of three edges (i{}j)(i,j) and (j{}k)(j,k) and either (k{}i)(k,i) or (k{}i)(i,k) . The former case is called a “transitive triple” and the latter is called a “cyclic triple”, so in the case of a directed network, triangle equals ttriple plus ctriple — thus at most two of these three terms can be in a model. |
categorical nodal attribute, directed, frequently-used, triad-related, undirected, binary |
triangles(attr=NULL, diff=FALSE,
levels=NULL) Triangles: By default, this term adds one statistic to the model equal to the number of triangles in the network. For an undirected network, a triangle is defined to be any set {(i,j), (j,k), (k,i)} of three edges. For a directed network, a triangle is defined as any set of three edges (i{}j)(i,j) and (j{}k)(j,k) and either (k{}i)(k,i) or (k{}i)(i,k) . The former case is called a “transitive triple” and the latter is called a “cyclic triple”, so in the case of a directed network, triangle equals ttriple plus ctriple — thus at most two of these three terms can be in a model. |
categorical nodal attribute, directed, frequently-used, triad-related, undirected, binary |
tripercent(attr=NULL, diff=FALSE,
levels=NULL) Triangle percentage: By default, this term adds one statistic to the model equal to 100 times the ratio of the number of triangles in the network to the sum of the number of triangles and the number of 2-stars not in triangles (the latter is considered a potential but incomplete triangle). In case the denominator equals zero, the statistic is defined to be zero. For the definition of triangle, see triangle . This is often called the mean correlation coefficient. This term can only be used with undirected networks; for directed networks, it is difficult to define the numerator and denominator in a consistent and meaningful way. |
categorical nodal attribute, triad-related, undirected, binary |
ttriple(attr=NULL, diff=FALSE,
levels=NULL) Transitive triples: By default, this term adds one statistic to the model, equal to the number of transitive triples in the network, defined as a set of edges {(i{}j), j{}k), (i{}k)}{(i,j), (j,k), (i,k)} . Note that triangle equals ttriple+ctriple for a directed network, so at most two of the three terms can be in a model. |
categorical nodal attribute, directed, triad-related, binary |
ttriad Transitive triples: By default, this term adds one statistic to the model, equal to the number of transitive triples in the network, defined as a set of edges {(i{}j), j{}k), (i{}k)}{(i,j), (j,k), (i,k)} . Note that triangle equals ttriple+ctriple for a directed network, so at most two of the three terms can be in a model. |
categorical nodal attribute, directed, triad-related, binary |
twopath 2-Paths: This term adds one statistic to the model, equal to the number of 2-paths in the network. For a directed network this is defined as a pair of edges (i{}j), (j{}k)(i,j), (j,k) , where i and j must be distinct. That is, it is a directed path of length 2 from i to k via j . For directed networks a 2-path is also a mixed 2-star but the interpretation is usually different; see m2star . For undirected networks a twopath is defined as a pair of edges {i,j}, {j,k} . That is, it is an undirected path of length 2 from i to k via j , also known as a 2-star. |
directed, undirected, binary |
Note that currently the keywords are somewhat ambiguous in their exclusivity. For example, a term marked as ‘directed’ can not be used with an undirected network, but a term not marked with either ‘directed’ or ‘undirected’ can be used with both. (rename to ‘directed-only’ ?)
Jump to keyword: operator valued binary directed dyad-independent quantitative nodal attribute undirected categorical nodal attribute curved triad-related bipartite frequently-used nonnegative quantitative dyadic attribute categorical dyadic attributeThis documentation was built with..
## R Under development (unstable) (2024-10-04 r87208)
## Platform: x86_64-pc-linux-gnu
## Running under: Debian GNU/Linux trixie/sid
##
## Matrix products: default
## BLAS: /home/pavel/Documents/Research/Software/R-trunk/lib/libRblas.so
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0
##
## locale:
## [1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_AU.utf8 LC_COLLATE=C
## [5] LC_MONETARY=en_AU.utf8 LC_MESSAGES=en_AU.UTF-8
## [7] LC_PAPER=en_AU.utf8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_AU.utf8 LC_IDENTIFICATION=C
##
## time zone: Australia/Sydney
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] ergm_4.7.1 network_1.18.2
##
## loaded via a namespace (and not attached):
## [1] trust_0.1-8 jsonlite_1.8.9 compiler_4.5.0
## [4] stringr_1.5.1 parallel_4.5.0 jquerylib_0.1.4
## [7] yaml_2.3.10 fastmap_1.2.0 lattice_0.22-6
## [10] coda_0.19-4.1 R6_2.5.1 robustbase_0.99-4-1
## [13] knitr_1.48 rbibutils_2.3 tibble_3.2.1
## [16] rle_0.9.2 statnet.common_4.10.0 bslib_0.8.0
## [19] pillar_1.9.0 rlang_1.1.4 utf8_1.2.4
## [22] stringi_1.8.4 cachem_1.1.0 xfun_0.48
## [25] sass_0.4.9 memoise_2.0.1 cli_3.6.3
## [28] magrittr_2.0.3 Rdpack_2.6.1 digest_0.6.37
## [31] grid_4.5.0 lpSolveAPI_5.5.2.0-17.12 lifecycle_1.0.4
## [34] DEoptimR_1.1-3 vctrs_0.6.5 evaluate_1.0.0
## [37] glue_1.8.0 fansi_1.0.6 rmarkdown_2.28
## [40] purrr_1.0.2 tools_4.5.0 pkgconfig_2.0.3
## [43] htmltools_0.5.8.1