% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/motif_census.R
\name{motif_net}
\alias{motif_net}
\alias{net_x_dyad}
\alias{net_x_triad}
\alias{net_x_tetrad}
\alias{net_x_mixed}
\title{Motifs of network cohesion}
\source{
Alejandro Espinosa 'netmem'
}
\usage{
net_x_dyad(.data)

net_x_triad(.data)

net_x_tetrad(.data)

net_x_mixed(.data, object2)
}
\arguments{
\item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar.
For more information on the standard coercion possible,
see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.}

\item{object2}{A second, two-mode network object.}
}
\value{
A \code{network_motif} named numeric vector or sometimes a data frame with
one row and a column for each motif type,
giving the count of each motif in the network.
This is printed as a tibble to avoid greedy printing of long vectors.
}
\description{
These functions include ways to take a census of the graphlets
in a network:
\itemize{
\item \code{net_x_dyad()} returns a census of dyad motifs in a network.
\item \code{net_x_triad()} returns a census of triad motifs in a network.
\item \code{net_x_tetrad()} returns a census of tetrad motifs in a network.
\item \code{net_x_mixed()} returns a census of triad motifs that span
a one-mode and a two-mode network.
}

See also \href{https://www.graphclasses.org/smallgraphs.html}{graph classes}.
}
\section{Dyad census}{

The dyad census counts the number of mutual, asymmetric, and null dyads
in a network.
For directed networks,
\itemize{
\item Mutual dyads have ties in both directions
\item Asymmetric dyads have a tie in one direction only
\item Null dyads have no ties
}

Note that for undirected and two-mode networks,
only mutual and null dyads are possible,
as the concept of an asymmetric dyad does not apply.
}

\section{Triad census}{

The triad census counts the number of three-node configurations in the network.
The function returns a matrix with a special naming convention:
\itemize{
\item 003: This is an empty triad; no ties
\item 012: This triad includes one tie
\item 102: This triad includes two ties, but they are not reciprocated
\item 021D: This triad includes two ties, one of which is reciprocated, and the other is directed towards the reciprocated tie
\item 021U: This triad includes two ties, one of which is
reciprocated, and the other is directed away from the reciprocated tie
\item 021C: This triad includes two ties, one of which is reciprocated, and the other is directed between the two non-reciprocated nodes
\item 111D: This triad includes three ties, two of which are
reciprocated, and the other is directed towards the reciprocated ties
\item 111U: This triad includes three ties, two of which are
reciprocated, and the other is directed away from the reciprocated ties
\item 030T: This triad includes three ties, all of which are
directed in a transitive manner (i.e. A->B, B->C, A->C)
\item 030C: This triad includes three ties, all of which are
directed in a cyclic manner (i.e. A->B, B->C
A->C)
\item 201: This triad includes three ties, all of which are reciproc
ated (i.e. A<->B, B<->C, A<->C)
\item 120D: This triad includes four ties, three of which are
reciprocated, and the other is directed towards the reciprocated ties
\item 120U: This triad includes four ties, three of which are
reciprocated, and the other is directed away from the reciprocated ties
\item 120C: This triad includes four ties, three of which are
reciprocated, and the other is directed between the two non-reciprocated
\item 210: This triad includes five ties, four of which are reciprocated, and the other is directed between the two non-reciprocated
\item 300: This triad includes six ties, all of which are reciprocated
}

Note that for undirected and two-mode networks, only 003, 102, and 201 are possible,
as the other configurations rely on the concept of directionality.
}

\section{Tetrad census}{

The tetrad census counts the number of four-node configurations in the network.
The function returns a matrix with a special naming convention:
\itemize{
\item E4 (aka co-K4): This is an empty set of four nodes; no ties
\item I4 (aka co-diamond): This is a set of four nodes with just one tie
\item H4 (aka co-C4): This set of four nodes includes two non-adjacent ties
\item L4 (aka co-paw): This set of four nodes includes two adjacent ties
\item D4 (aka co-claw): This set of four nodes includes three adjacent ties,
in the form of a triangle with one isolate
\item U4 (aka P4, four-actor line): This set of four nodes includes three ties
arranged in a line
\item Y4 (aka claw): This set of four nodes includes three ties all adjacent
to a single node
\item P4 (aka paw, kite): This set of four nodes includes four ties arranged
as a triangle with an extra tie hanging off of one of the nodes
\item C4 (aka bifan): This is a symmetric box or 4-cycle or set of shared choices
\item Z4 (aka diamond): This resembles C4 but with an extra tie cutting across the box
\item X4 (aka K4): This resembles C4 but with two extra ties cutting across the box;
a realisation of all possible ties
}

Graphs of these motifs can be shown using
\code{plot(net_x_tetrad(ison_southern_women))}.
}

\examples{
net_x_dyad(manynet::ison_algebra)
net_x_triad(manynet::ison_adolescents)
net_x_tetrad(ison_southern_women)
net_x_mixed(fict_marvel)
}
\references{
\subsection{On the dyad census}{

Holland, Paul W., and Samuel Leinhardt. 1970.
"A Method for Detecting Structure in Sociometric Data".
\emph{American Journal of Sociology}, 76: 492-513.
\doi{10.1016/B978-0-12-442450-0.50028-6}

Wasserman, Stanley, and Katherine Faust. 1994.
"Social Network Analysis: Methods and Applications".
Cambridge: Cambridge University Press.
}

\subsection{On the triad census}{

Davis, James A., and Samuel Leinhardt. 1967.
“\href{https://files.eric.ed.gov/fulltext/ED024086.pdf}{The Structure of Positive Interpersonal Relations in Small Groups}.” 55.
}

\subsection{On the tetrad census}{

Ortmann, Mark, and Ulrik Brandes. 2017.
“Efficient Orbit-Aware Triad and Quad Census in Directed and Undirected Graphs.”
\emph{Applied Network Science} 2(1):13.
\doi{10.1007/s41109-017-0027-2}.

McMillan, Cassie, and Diane Felmlee. 2020.
"Beyond Dyads and Triads: A Comparison of Tetrads in Twenty Social Networks".
\emph{Social Psychology Quarterly} 83(4): 383-404.
\doi{10.1177/0190272520944151}
}

\subsection{On the mixed census}{

Hollway, James, Alessandro Lomi, Francesca Pallotti, and Christoph Stadtfeld. 2017.
“Multilevel Social Spaces: The Network Dynamics of Organizational Fields.”
\emph{Network Science} 5(2): 187–212.
\doi{10.1017/nws.2017.8}
}
}
\seealso{
Other cohesion:
\code{\link{mark_triangles}},
\code{\link{measure_breadth}},
\code{\link{measure_cohesion}},
\code{\link{measure_fragmentation}},
\code{\link{motif_node}}

Other motifs:
\code{\link{motif_brokerage_net}},
\code{\link{motif_brokerage_node}},
\code{\link{motif_exposure}},
\code{\link{motif_hazard}},
\code{\link{motif_hierarchy}},
\code{\link{motif_node}},
\code{\link{motif_path}},
\code{\link{motif_periods}}
}
\concept{cohesion}
\concept{motifs}
