50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


ergm (version 4.9.0)

attrcov-ergmTerm: Edge covariate by attribute pairing

Description

This term adds one statistic to the model, equal to the sum of the covariate values for each edge appearing in the network, where the covariate value for a given edge is determined by its mixing type on attr. Undirected networks are regarded as having undirected mixing, and it is assumed that mat is symmetric in that case.

This term can be useful for simulating large networks with many mixing types, where nodemix would be slow due to the large number of statistics, and edgecov cannot be used because an adjacency matrix would be too big.

Usage

# binary: attrcov(attr, mat)

# valued: attrcov(attr, mat, form="sum")

Arguments

attr

a vertex attribute specification (see Specifying Vertex attributes and Levels (?nodal_attributes) for details.)

mat

a matrix of covariates with the same dimensions as a mixing matrix for attr

form

how to aggregate tie values in a valued ERGM: "sum" (the default) for a statistic of the form i,jxi,jyi,j, where yi,j is the value of dyad (i,j) and xi,j is the term's covariate associated with it; and "nonzero" with the edge considered to be present if its value is not 0. See ergmTerm for more information.

See Also

ergmTerm for index of model terms currently visible to the package.

ergm:::.formatTermKeywords("ergmTerm", "attrcov", "subsection")