R: Three-trails

InitErgmTerm.threepath {ergm} | R Documentation

## Three-trails

### Description

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 i-->j-->k-->l , and RRL 3-trail is of the form i-->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 i<-->j does not count as a 3-trail of the form i-->j-->i<--j ; however, in the subnetwork i<-->j-->k , there are two directed 3-trails, one LRR ( k<--j-->i-->j ) and one RRR ( k<--j-->i-->j ).

### Usage

    # binary: threepath

    # binary: threetrail(keep=NULL, levels=NULL)

### Arguments

`keep` | deprecated
`levels` | specify a subset of the four statistics for directed networks. (See Specifying Vertex attributes and Levels (`?nodal_attributes`) for details.)

### Note

The argument `keep` is retained for backwards compatibility and may be removed in a future version. When both `keep` and `levels` are passed, `levels` overrides `keep`.

This term used to be (inaccurately) called `threepath` . That name has been deprecated and may be removed in a future version.

### See Also

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

[Package ergm version 4.2.2 Index]