R: Triangle percentage

tripercent-ergmTerm {ergm} | R Documentation

## Triangle percentage

### Description

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.

### Usage

    # binary: tripercent(attr=NULL, diff=FALSE, levels=NULL)

### Arguments

`attr, diff` | quantitative attribute (see Specifying Vertex attributes and Levels (`?nodal_attributes`) for details.) If `attr` is specified and `diff` is `FALSE` , then the counts are restricted to those triples of nodes with equal values of the vertex attribute specified by `attr` . If `attr` is specified and `diff` is `TRUE` , then one statistic is added for each value of `attr` , equal to the number of triangles where all three nodes have that value of the attribute.
`levels` | add one statistic for each value specified if `diff` is `TRUE` attributes and Levels (`?nodal_attributes`) for details.)

### See Also

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

[Package ergm version 4.2.1 Index]