% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/InitErgmTerm.dgw_sp.R
\name{dsp-ergmTerm}
\alias{dsp-ergmTerm}
\alias{InitErgmTerm.ddsp}
\alias{ddsp-ergmTerm}
\alias{InitErgmTerm.dsp}
\title{Directed dyadwise shared partners}
\usage{
# binary: ddsp(d, type="OTP")

# binary: dsp(d, type="OTP")
}
\arguments{
\item{d}{a vector of distinct integers}

\item{type}{A string indicating the type of shared partner or path to be considered for directed networks: \code{"OTP"} (default for directed), \code{"ITP"}, \code{"RTP"}, \code{"OSP"}, and \code{"ISP"}; has no effect for undirected. See the section below on Shared partner types for details.}
}
\description{
This term adds one network statistic to the model for each element in \code{d} where the \eqn{i} th such statistic equals the number of dyads in the network with exactly \code{d[i]} shared partners.
}
\note{
This term takes an additional term option (see
\code{\link[=ergm-options]{options?ergm}}), \code{cache.sp}, controlling whether
the implementation will cache the number of shared partners for
each dyad in the network; this is usually enabled by default.

This term can only be used with directed networks.
}
\section{Shared partner types}{
 While there is only one shared partner configuration in the undirected
case, nine distinct configurations are possible for directed graphs, selected
using the \code{type} argument. Currently, terms may be defined with respect to
five of these configurations; they are defined here as follows (using
terminology from Butts (2008) and the \code{relevent} package):
\itemize{
\item Outgoing Two-path (\code{"OTP"}): vertex \eqn{k} is an OTP shared partner of ordered
pair \eqn{(i,j)} iff \eqn{i \to k \to j}{i->k->j}. Also known as "transitive
shared partner".
\item Incoming Two-path (\code{"ITP"}): vertex \eqn{k} is an ITP shared partner of ordered
pair \eqn{(i,j)} iff \eqn{j \to k \to i}{j->k->i}. Also known as "cyclical shared
partner"
\item Reciprocated Two-path (\code{"RTP"}): vertex \eqn{k} is an RTP shared partner of ordered
pair \eqn{(i,j)} iff \eqn{i \leftrightarrow k \leftrightarrow j}{i<->k<->j}.
\item Outgoing Shared Partner (\code{"OSP"}): vertex \eqn{k} is an OSP shared partner of
ordered pair \eqn{(i,j)} iff \eqn{i \to k, j \to k}{i->k, j->k}.
\item Incoming Shared Partner (\code{"ISP"}): vertex \eqn{k} is an ISP shared partner of ordered
pair \eqn{(i,j)} iff \eqn{k \to i, k \to j}{k->i, k->j}.
By default, outgoing two-paths (\code{"OTP"}) are calculated. Note that Robins et al. (2009)
define closely related statistics to several of the above, using slightly different terminology.
}
}

\seealso{
\code{\link{ergmTerm}} for index of model terms currently visible to the package.

\Sexpr[results=rd,stage=render]{ergm:::.formatTermKeywords("ergmTerm", "dsp", "subsection")}
}
\concept{directed}
