% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/motifs.R
\name{motif_census}
\alias{motif_census}
\alias{print.cograph_motifs}
\title{Network Motif Analysis}
\usage{
motif_census(
  x,
  size = 3,
  n_random = 100,
  method = c("configuration", "gnm"),
  directed = NULL,
  seed = NULL
)

\method{print}{cograph_motifs}(x, ...)
}
\arguments{
\item{x}{A matrix, igraph object, or cograph_network}

\item{size}{Motif size: 3 (triads) or 4 (tetrads). Default 3.}

\item{n_random}{Number of random networks for null model. Default 100.}

\item{method}{Null model method: "configuration" (preserves degree) or
"gnm" (preserves edge count). Default "configuration".}

\item{directed}{Logical. Treat as directed? Default auto-detected.}

\item{seed}{Random seed for reproducibility}

\item{...}{Passed to methods; currently unused.}
}
\value{
A \code{cograph_motifs} data frame with motif count, null-model mean,
null-model standard deviation, z-score, p-value, and significance columns.
The motif size, directed flag, null-model method, and number of random
networks are stored as attributes.
}
\description{
Analyze recurring subgraph patterns (motifs) in networks and test their
statistical significance against null models.
}
\examples{
# Create a directed network
mat <- matrix(c(
  0, 1, 1, 0,
  0, 0, 1, 1,
  0, 0, 0, 1,
  1, 0, 0, 0
), 4, 4, byrow = TRUE)

# Analyze triadic motifs
m <- motif_census(mat)
print(m)
plot(m)

}
\seealso{
\code{\link[=motifs]{motifs()}} for the unified API, \code{\link[=extract_motifs]{extract_motifs()}} for detailed
triad extraction, \code{\link[=plot.cograph_motifs]{plot.cograph_motifs()}} for plotting

Other motifs: 
\code{\link{extract_motifs}()},
\code{\link{extract_triads}()},
\code{\link{get_edge_list}()},
\code{\link{motifs}()},
\code{\link{plot.cograph_motif_analysis}()},
\code{\link{plot.cograph_motifs}()},
\code{\link{subgraphs}()},
\code{\link{triad_census}()}
}
\concept{motifs}
