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.
# binary: b2nodematch(attr, diff=FALSE, keep=NULL, alpha=1, beta=1, byb1attr=NULL,
# levels=NULL)
by default, one statistic will be added to the model. If diff
is set to TRUE
, one statistic will be added for each unique value of the attr
attribute
deprecated
optional discount parameters both of which take values from [0, 1]
, only one should be
set at one time
specifies a
second mode categorical attribute. Setting this argument
will separate the orginal statistics based on the values of the set second mode attribute---
i.e. for example, if diff
is FALSE
, then the sum of all the statistics for
each level of this second-mode attribute will be equal to the original b1nodematch
statistic where byb2attr
set to NULL
.
select a subset of attr
values to include. (See Specifying Vertex
attributes and Levels (?nodal_attributes
) for details.)
a vertex attribute specification (see Specifying Vertex attributes and Levels (?nodal_attributes
) for details.)
If an alpha
discount parameter is used, each of these statistics gives the sum of
the number of common first-mode nodes raised to the power alpha
for each pair of
second-mode nodes with that attribute. If a beta
discount parameter is used, each
of these statistics gives half the sum of the number of two-paths with two second-mode nodes
with that attribute as the two ends of the two path raised to the power beta
for each
edge in the network.
ergmTerm
for index of model terms currently visible to the package.
ergm:::.formatTermKeywords("ergmTerm", "b2nodematch", "subsection")