R: Triangles within neighborhoods

localtriangle-ergmTerm {ergm} | R Documentation

## Triangles within neighborhoods

### Description

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) and either (k{\rightarrow}i) or (k{≤ftarrow}i) where again all nodes are within the same neighborhood.

### Usage

    # binary: localtriangle(x)

### Arguments

`x` | an undirected network or an symmetric adjacency matrix that specifies whether the two nodes are in the same neighborhood. Note that `triangle` , with or without an argument, is a special case of `localtriangle` .

### See Also

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

[Package ergm version 4.2.1 Index]