% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.R
\name{print.netsim}
\alias{print.netsim}
\title{Print Method for Network Model Simulations}
\usage{
\method{print}{netsim}(x, nwstats = TRUE, digits = 3, network = 1, ...)
}
\arguments{
\item{x}{An object of class \code{netsim}, from \code{\link[=netsim]{netsim()}}.}

\item{nwstats}{If \code{TRUE} (the default), print network statistics tables
(formation, duration, and dissolution) when available.}

\item{digits}{Number of digits to print in the network statistics tables.}

\item{network}{Integer index of the network for which to display statistics,
for multi-network models. Default is \code{1}.}

\item{...}{Additional arguments (currently ignored).}
}
\description{
Prints a detailed summary of a stochastic network model
simulation object, including simulation metadata, model parameters,
output variables, and (optionally) network formation, duration, and
dissolution statistics with target comparisons.
}
\details{
Given a \code{netsim} object, \code{print.netsim} displays the following sections:

\strong{Simulation summary}: model class, model type (e.g., SI, SIR, SIS),
number of simulations, number of time steps, and number of network groups.

\strong{Model parameters}: printed via \code{print.param.net()}, showing fixed and
(if applicable) random parameters.

\strong{Model functions}: for extension models (\code{type = NULL}), lists the names
of all custom module functions.

\strong{Model output}: the names of all epidemic output variables, saved network
objects, transmission matrices, and any other saved elements.

\strong{Network statistics} (when \code{nwstats = TRUE} and network statistics were
saved during the simulation):

The formation, duration, and dissolution statistics tables are computed and
displayed in the same way as for \code{\link[=print.netdx]{print.netdx()}}.  Each table contains the
columns \code{Target}, \verb{Sim Mean}, \verb{Pct Diff}, \verb{Sim SE}, \verb{Z Score},
\verb{SD(Sim Means)}, and \code{SD(Statistic)}.  The \verb{Sim Mean} column is the mean
statistic value across all time steps and simulations.  \verb{Sim SE} is the
standard error estimated using \link[coda:effectiveSize]{coda::effectiveSize}.  \verb{Pct Diff} gives
\verb{(Sim Mean - Target) / Target} and \verb{Z Score} gives
\verb{(Sim Mean - Target) / Sim SE} when a target is available.  \verb{SD(Sim Means)}
is the standard deviation of per-simulation means, and \code{SD(Statistic)} is
the overall standard deviation of the statistic.

\emph{Formation statistics}: each row corresponds to a network statistic from the
formation formula (e.g., \code{edges}, \code{nodematch}), compared against the target
statistics from network estimation.  These statistics assess whether the
network structure is maintained at target levels during the epidemic
simulation (which is particularly important in open-population models where
demographic turnover can shift network structure).

\emph{Duration statistics}: each row corresponds to a dissolution model dyad
type.  In a homogeneous dissolution model (\code{~offset(edges)}), all dyads are
of the \code{edges} type.  The statistic of interest is the mean age of extant
edges, compared against the target duration from \code{\link[=dissolution_coefs]{dissolution_coefs()}}.

\emph{Dissolution statistics}: same row structure as the duration table.  The
statistic of interest is the edge dissolution rate (proportion of edges
dissolving per time step), compared against \verb{1 / target duration}.

Duration and dissolution tables are only available when
\code{control$save.diss.stats = TRUE}, \code{control$save.network = TRUE},
\code{control$tergmLite = FALSE}, and the dissolution formula is
\code{~offset(edges)}.  When these conditions are not met, a note listing the
requirements is printed instead.
}
\seealso{
\code{\link[=netsim]{netsim()}}, \code{\link[=print.netdx]{print.netdx()}}, \code{\link[=summary.netsim]{summary.netsim()}}.
}
