This function attempts to find a network or networks whose statistics match
those passed in via the target.stats vector.
san(object, ...)# S3 method for formula
san(object, response = NULL, reference = ~Bernoulli,
constraints = ~., target.stats = NULL, nsim = 1, basis = NULL,
sequential = TRUE, control = control.san(), verbose = FALSE, ...)
# S3 method for ergm
san(object, formula = object$formula,
constraints = object$constraints, target.stats = object$target.stats,
nsim = 1, basis = NULL, sequential = TRUE,
control = object$control$SAN.control, verbose = FALSE, ...)
Either a formula or an ergm object. The
formula should be of the form y ~ <model terms>, where
y is a network object or a matrix that can be coerced to a
network object. For the details on the
possible <model terms>, see ergm-terms. To
create a network object in , use the
network() function, then add nodal attributes to it using
the %v% operator if necessary.
Further arguments passed to other functions.
Name of the edge attribute whose value
is to be modeled. Defaults to NULL for simple presence or absence.
One-sided formula whose RHS gives the
reference measure to be used. (Defaults to ~Bernoulli.)
A one-sided formula specifying one or more constraints on
the support of the distribution of the networks being simulated. See the
documentation for a similar argument for ergm and see
list of implemented constraints for more information. For
simulate.formula, defaults to no constraints. For
simulate.ergm, defaults to using the same constraints as those with
which object was fitted.
A vector of the same length as the number of terms
implied by the formula, which is either object itself in the case of
san.formula or object$formula in the case of san.ergm.
Number of desired networks.
If not NULL, a network object used to start the Markov
chain. If NULL, this is taken to be the network named in the formula.
Logical: If TRUE, the returned draws always use the prior draw as the starting network; if FALSE, they always use the original network.
A list of control parameters for algorithm tuning; see
control.san.
Logical: If TRUE, print out more detailed information as the simulation runs.
(By default, the formula is taken from the ergm
object. If a different formula object is wanted, specify it here.
A network or list of networks that hopefully have network
statistics close to the target.stats vector.