% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/InitErgmTerm.R
\name{localtriangle-ergmTerm}
\alias{localtriangle-ergmTerm}
\alias{InitErgmTerm.localtriangle}
\title{Triangles within neighborhoods}
\usage{
# binary: localtriangle(x)
}
\arguments{
\item{x}{an undirected
network or an symmetric adjacency matrix that specifies whether the two nodes
are in the same neighborhood. Note that \code{triangle} , with or without an argument, is a
special case of \code{localtriangle} .}
}
\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 \eqn{\{(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
\eqn{(i{\rightarrow}j), (j{\rightarrow}k)}{(i,j), (j,k)} and either
\eqn{(k{\rightarrow}i)} or \eqn{(k{\leftarrow}i)} where again all nodes are
within the same neighborhood.
}
\seealso{
\code{\link{ergmTerm}} for index of model terms currently visible to the package.

\Sexpr[results=rd,stage=render]{ergm:::.formatTermKeywords("ergmTerm", "localtriangle", "subsection")}
}
\concept{categorical dyadic attribute}
\concept{directed}
\concept{triad-related}
\concept{undirected}
