% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/InitErgmConstraint.R
\name{egocentric-ergmConstraint}
\alias{egocentric-ergmConstraint}
\alias{InitErgmConstraint.egocentric}
\title{Preserve values of dyads incident on vertices with given attribute}
\usage{
# egocentric(attr=NULL, direction="both")
}
\arguments{
\item{attr}{a vertex attribute specification (see Specifying Vertex attributes and Levels (\code{?nodal_attributes}) for details.)}

\item{direction}{one of \code{"both"}, \code{"out"} and \code{"in"}, only applies to directed networks. \code{"out"} only preserves the out-dyads of those actors and \code{"in"} preserves their in-dyads.}
}
\description{
Preserve values of dyads incident on vertices with attribute \code{attr} being \code{TRUE} or if \code{attrname} is \code{NULL} , the vertex attribute \code{"na"} being \code{FALSE}.
}
\seealso{
\code{\link{ergmConstraint}} for index of constraints and hints currently visible to the package.

\Sexpr[results=rd,stage=render]{ergm:::.formatTermKeywords("ergmConstraint", "egocentric", "subsection")}
}
\concept{directed}
\concept{dyad-independent}
\concept{undirected}
